Refresh "Add to cart" button after pressing on it

Solved
Highlighted
New Member
4 0 0

Hy guys!
I`m facing a problem and i hope you help me.
I`m using the free theme "Simple" and i wanted to add an "Add to cart" button to my collection list, because the theme support "Add to cart" button just in single product page.
After i followed the instructions from this thread " https://help.shopify.com/en/themes/customization/products/add-to-cart/stay-on-product-page-when-item... " from 1-9 instructions, i managed to add an "Add to cart" button on the products from the pages i wanted, but in the single product page i have the problem that when the customer clicks on "Add to cart", that button does not refresh (like the buttons that i added), and it cant add another product from that single product page, because it stays freeze saying "ADDED TO CART", until he manually refresh the page.
Can you help me to add the same button that refresh, or refresh the page itself, after a customer hit "Add to cart" from single product page?
Thank you!

0 Likes
Highlighted
Shopify Partner
1166 32 214

It could be a js error.can you share the URL?

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
- Available for hiring. lixon@ecommercestudio.in
0 Likes
Highlighted
New Member
4 0 0

For example this is a single product page, and after you press "Add to cart (Adauga in cos)" it freezes and the customer needs to refresh the page if he wants to add again the same product to cart.

https://romfarma.com/products/kamagra-100-gold-pentru-erectie

0 Likes
Highlighted
Shopify Partner
1166 32 214

This is an accepted solution.

Open the theme.js.liquid inside Assets folder. Go to line 1276 and add location.reload();

as a new line. See screenshot attached. This will reload the page after the product is added to cart.

 

Simple ~ Shopify 2019-08-12 21-20-13.png

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
- Available for hiring. lixon@ecommercestudio.in
1 Like
Highlighted
New Member
4 0 0

Wow, man! You are the best! Thank you!!!!!

0 Likes
Highlighted
Tourist
7 0 3

I have the exact same problem but cannot find the location to dd this piece of code. Can someone help me please?

 

Product page does not refresh unless manually refreshed.



 

https://www.the-olivegrove.co.uk/


0 Likes
Highlighted
New Member
1 0 0

thanks for this!

0 Likes