All things Shopify and commerce
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!
Hello @roselyn_025, share the store link.
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
$(document).ready(function(){
$('.product__add-to-cart-button').click(function(){window.history.back();})
});
Hi Roselyn
I see that you were able to implement the non-redirect button on your collections which look great and work as I have been trying to get to for the past few days. Any help will be gladly appreciated. My website is www.meandatree.com. Cheers
David
Hi there,
How were you able to eliminate the redirect to cart? Need help with this been trying for a while . I got this far but glitchy when page button refreshes, and their is no "View Cart" button. https://www.meandatree.com/collections/best-natural-soaps
Much appreciated
Cheers
<form method="submit" action="/cart/add">
<input type="hidden" name="id" value="{{ product.variants.first.id }}" />
<input class="product-form__quantity-input" type="number" id="Quantity-product-template" name="quantity" value="1" min="1" pattern="[0-9]*" style="padding-left: 105.925px; opacity: 1;">
<button class="btn btn--to-secondary btn--full product__add-to-cart-button shopify-payment-btn btn--secondary" data-cart-submit="" type="submit" name="add" aria-label="Add to Cart">
<span class="primary-text" aria-hidden="false" data-cart-primary-submit-text="">
Quick Shop
</span>
<span class="secondary-text" aria-hidden="true" data-cart-secondary-submit-text="">View cart</span>
</button>
<input type="hidden" name="return_to" value="back" />
Appreciate any help Thanks
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024