Product pages - Stay on the product page after adding products to the cart

DanGlazenburg
Tourist
6 0 2

This worked perfectly for me on the preview page, but when i made the theme published it did not.

I removed the line and re-tested it... It worked perfectly without the code?? lol?

0 Likes
NandoMedina
New Member
2 0 0

Thank you very much for this information. I have used and followed as instructed, and it worked out perfectly in my RETINA v.04 themes. I tested in both platforms, Desktop and Mobile, and both work perfectly.

You can check my store here to see the functionality: https://www.nandomedina.com/

 

0 Likes
HeimatSere
New Member
1 0 0

Great explanation and description of the steps. Followed each one precisely and it works! Great job!

0 Likes
Nubi-Han
New Member
4 0 0

Hi All,

Desperately hoping @TyW or anyone who got this to work with the Brooklyn Theme can assist!

I have tried all of the steps in the original instructions:

https://help.shopify.com/themes/customization/products/stay-on-product-page-when-items-added-to-cart

This didn't work, so I then tried all of the additional tips to the end of this thread as well as some others I found for the Debut Theme just in case:

https://community.shopify.com/c/Shopify-Design/Debut-Theme-Stop-Add-to-Cart-from-directing-to-cart-p...

Still no joy.

I've thoroughly checked and re-checked every step and STILL cannot get the 'Add to Cart' button on product pages to stop re-directing to the Cart Page. What am I doing wrong??

Happy to share site details if need be.

Thanks in advance.

NHx

 

 

0 Likes
DanGlazenburg
Tourist
6 0 2

Update - when publishing it works with all the code, including the google API

Nubi-Han
New Member
4 0 0

Hi Dan,

Thanks so much for your reply.

I downloaded a fresh copy to check the version, and it is "theme_version": "17.6.0", which is the one I am am currently using..

Also my site is published, just password protected.

Do you have any other suggestions at all - sorry to be a pain!

 

NH x

0 Likes
DanGlazenburg
Tourist
6 0 2

Try without password protection to see if that's causing the issue.

I'm using 17.13.0 downloaded today... I had to rebuilt today due to an app decommissioning, causing my backup products file being overwritten and unfixable...

I also put a bunch of breaks (just pressing enter, not <br>) between the google API and the Ajax render.

0 Likes
Nubi-Han
New Member
4 0 0

Ouch, sorry to hear that.

I'm trying to avoid a re-build unless absolutely necessary - I haven't customised massively but i'm so close to going fully live. This is the last big hurdle..

Thanks for the password tip - I tried disabling but unfortunately that didn't work either.

This is a big ask, and no worries if not, but would you mind DM'ing me your theme and ajaxify-cart.liquid code from a working / non-redirecting version? I'd like to check if there are any discrepancies.

 

Thanks,

NHx

0 Likes
GouravKumar
Tourist
10 0 0

Damn Good! Its Work Like Magic, Thanks billion times

GouravKumar_0-1622552812820.png

 

0 Likes
jessbeincute
New Member
2 0 0

Hello, thanks for your solution. Everything works... except my cart doesn't automatically update the cart.

I noticed in your demo website the cart count updates. How do I get mine to update?

Theme: Minimal 

0 Likes