How can I fix add to cart button functionality across all website sections?

30 0 9



I am working on a website where the add to cart button on the product page creates a drop down banner that shows the items added to cart.



The banner is shown at the top of the image above, said banner would disappear after a few seconds and the customer can either click to view cart or continue shopping.




When adding the same product form to (Related products Section) the functionality of add to cart button changes to directly take you to cart page.


I want the add to cart button to do the same thing  (showing the banner) in all sections in my website. But for some reason, having the add to cart button inside the related products section (provided by the theme "Pipeline") prevents the functionality of the banner as if I place the add to cart form outside the related section it works (PS: i have the add to cart button on the homepage of the website in a collection and it operates as intended) The only issue now is having it work inside the related sections.



Please provide help and advice.


Thank you



Reply 1 (1)

Shopify Partner
6338 578 1343

Check that all recommendations sections have a unique id and that the variant id is unique to that add to cart button and not sharing/conflicting with the main products add-to-cart button or form data. Similar to common quickview implementation problems where the wrong product is added to the cart because id's dont update to the context of what is being viewed in the quickview.


If the recommendation section is a frontend template that builds only on the client side you may need to reinitialize the cart or other parts of the theme code.



Save time & money ,Ask Questions The Smart Way

Confused? Busy? Get the solution you need

Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to