Jump to content

changing "adding" and "added" text in add to cart button

Recommended Posts

Hey there, I managed to change the add to cart button text (in 7.1), but still didn't figure out a way to change the  "adding" and "added!" animation text that appears after clicking the button. Any ideas on that? Thank you!

Edited by Franziska
Link to comment

@tuanphan

I don't recall solving this exact issue. I've talked to some community members about the Add To Cart button being dynamic ( Adding..., Added! behaviour). The one piece of code I do recall is redirecting to another URL after the add to cart button is done adding to the cart.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Guys, I didn't see that you already posted a solution! Sorry for the late reply. I did try it now but unfortunately it doesn't work for me. I tried different forms of writing the original text (uppercase, lowercase, with/without punctuation) but nothing changes.

Link to comment

I can see now that my notes are not as helpful as they could be. I'll need to fix the issue.

In the mean time try the following.

    const originalReplacmentText = {
    
      // for the original text enter exactly what is displayed by SS
      
      'Hinzufügen ...' : 'Hinzufügen... / Adding...', // adding
      
      'Hinzugefügt!' : 'Hinzugefügt! / Added!' // added
      
      }
      

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
Quote

Is there a way to do the same for the send button in the contact

Please see Replace Form Submit Button Submitting Text.

Let us know how it goes.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Thank you! Unfortunately the code doesn't work for me – what am I doing wrong? 🙂 Also, there is "just" the option to replace the "submitting…" not the "submitted!" text, right? Is it possible to change both like in the adding/added button?

Link to comment

It's not working as you need to follow the second instruction. Install twcsl.

Are you seeing the text submitted! when you submit a form? My observations revealed that the form only has the submitting text as that form redirects so it doesn't need to indicate the submitted state as the redirect confirms to the user that something happened. If you are seeing submitted on your form may I send some test forms through to do some testing?

I'm happy to adjust the code if I can confirm there is indeed submitted text.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

You are absolutely right! It works now! The only thing is, that if I do not put in all the information needed to submit the message, the submitting… doesn't switch back to "submit". So it seems like the message is trying to be submitted all the time. I think its easiest to understand by comparing the German to the English version: 

German: https://www.lupinion.eco/de/contact

English: https://www.lupinion.eco/en/contact

Bildschirmfoto 2021-05-28 um 09.16.26.png

Bildschirmfoto 2021-05-28 um 09.16.36.png

Link to comment
Quote

if I do not put in all the information needed to submit the message, the submitting… doesn't switch back to "submit". 

Thank you for the bug report. Looks like I need to try and check for an error condition in the form and then not apply the replacement text.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 1 year later...
On 5/28/2021 at 6:28 PM, creedon said:

I have updated my May 26th code post.

Let us know how it goes.

Hi, I would very much like to use this code, but I see that it doesn't work on English (United Kingdom) language sites. If you update it, it would be great if you added this option!

Link to comment
11 minutes ago, AC1 said:

but I see that it doesn't work on English (United Kingdom) language sites.

Please post the URL for a page on your site where we can see your issue. I can guarantee that I can make it compatible but I'm willing to take a look.

If your site is not public please set up a site-wide password, if you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the documentation at the link provided to understand how it works.

Please read the documentation at the link provided on how to share a link to your site to understand how it works. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

We can then take a look at your issue.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.