How can I modify the remove item from cart button to also go to a catalog when the item is removed on click?
Here's the button:
<a href="/all-ttha-gear" onclick="UpdateItemQuantity(0,324401,282161,9383705,337215,'','US');return false;">Continue Shopping</a>
I used javascript to change the text to "Continue Shopping" and changed the href value from "#" to "/all-ttha-gear".
This link is being displayed in a modal when a user drops the shopping cart total below $40. I want them to click continue shopping and have it remove the bonus item from the cart.
As the a tag is displayed above, it removes the correct product but stays on the same page.
Any thoughts?
I was messing around with it and figured it out.
I changed the onclick value ...false to ...true.
Apparently this allows the href value to be used after the onclick function has run. Here's the jquery i used to make the change.
$(linkA).attr('onclick',$(linkA).attr('onclick').replace('false','true'));
I hope this helps someone else.