Issue: A custom “Add to Cart” button added to the featured collection (snippets/card-product.liquid) posts to /cart/add and redirects to the /cart page instead of opening the cart drawer (slide-out mini cart), despite the cart type being set to “drawer.”
Context:
Code used: a basic form posting to /cart/add with variant id and a submit button.
A cart drawer is the slide-out basket UI expected to open on add-to-cart without a page reload.
Recent updates:
A helper requested store access; the site URL and password were provided for review.
Another participant recommended using the theme’s default “Add to Cart” option for the featured collection (screenshot shared), which typically integrates with the drawer behavior.
The requester accepted this tip but still wants the “Add to Cart” button displayed above “Choose Options,” and specifically needs the drawer to open instead of redirecting.
Status and open questions:
No confirmed fix yet; review is pending.
Key need: implement the theme’s AJAX/cart-drawer flow for the custom button and adjust button order in the featured collection layout.
Summarized with AI on December 18.
AI used: gpt-5.
I’ve added an “Add to Cart” button to the featured collection on my homepage by inserting the following code into
snippets/card-product.liquid.
Add to Cart
I’ve set the cart type to “drawer” in the cart options, but when I click the “Add to Cart” button, it redirects me to the /cart page instead of opening the drawer.
Does anyone have any suggestions on how to fix this?
Thank you for providing the details of the issue. To better understand and resolve the problem with the “Add to Cart” button on your featured collection, could you please share your store URL with me? This will allow me to review the implementation directly and provide the most accurate solution.
Your cooperation is greatly appreciated, and I look forward to assisting you further.
Oh wow, thanks! I’m not sure how I missed that. However, I’d still like to have the “Add to Cart” button appear above the “Choose Options” button. Do you happen to know how I can fix the issue where clicking “Add to Cart” redirects to the cart page instead of opening the drawer (the sliding basket from the right)?