Narrative Theme: Collection page - how to stop Add to Cart button Redirect to Cart Page

Highlighted
New Member
3 0 0

Hi! Please help.. I'm having a hard time fixing the add to cart button on collection page to stop redirecting on cart page.

Is there any way to fix it?

Appreciate any help. Thanks in advance!

0 Likes
Highlighted
Shopify Partner
613 96 139

Hello @roselyn_025, share the store link. 

0 Likes
Highlighted
New Member
3 0 0

Here's the store link

https://partnersinwine.com.au/collections/frontpage

It's a password protected.

password: wine

 

When you click on a single product for example:

https://partnersinwine.com.au/collections/frontpage/products/2018-rachis-syrah

and click add to cart button, it stays on the same page. 

That's what I wanted to do on collection pages, but it's doesn't work

0 Likes
Highlighted
Shopify Partner
613 96 139

@roselyn_025,

1. Go to Online Store->Theme->Edit code
2. Asset->theme.js->paste below code at bottom of files

 

$(document).ready(function(){
$('.product__add-to-cart-button').click(function(){window.history.back();})
});

 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: wahabahmadghori@gmail.com

 

 

0 Likes
Highlighted
New Member
3 0 0

@Wahab_Ahmad thanks for your reply. I tried that but didn't work.. 

0 Likes