Jump to content

Add new text in add to cart box

Recommended Posts

Posted (edited)

Site URL: https://www.valbanera.com/

Hello, I'd like to show the text "View Shopping Bag" in the add to cart box , after someone has added a product. 

 Now some people get confused when they add a product, and maybe this will help.

Example https://www.net-a-porter.com/en-us/shop/product/jimmy-choo/narisa-knotted-leather-sandals/1306082

 

image.png.f08fc46565ec5067563bce9119c8a9c0.png


Can anyone help me with this?

Thanks!

Maribel 

Edited by Maribeltb
Posted (edited)

I'm looking for this also -  the plugin is not the solution for me. Any code to target that button after it's clicked? 

I used your code, @tuanphan to change Add to Cart text on the button before the action and it works great. (thanks!) I tried replicating it targeting the button after the action but with no success.

I want the text after button is clicked to remain "added" - not revert to Add to Cart.

tia.

retrographicshop.com

Edited by junecz
Posted (edited)

@junecz

Please see the following.

Add the following to Store Settings > Advanced > Page Header Code Injection for the store page.

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.

  • 2 weeks later...
Posted

Thank you @creedon. I really appreciate you taking the time.

Alas, this does not do the trick. After clicking the button, the text displays "adding..." then "added!" and then still reverts to "add to cart". 

Posted

Please move the following from Settings > Advanced > Code Injection > FOOTER to Settings > Advanced > Code Injection > HEADER.

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>

My code could not run because the jQuery library had not yet been loaded.

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.

  • 9 months later...

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.