Personalized checkout and custom promotions with Shopify Scripts
Dear community,
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.
<form action="/cart/add" method="post" enctype="multipart/form-data" class="product-form">
<input type="hidden" name="id" value="{{ card_product.variants.first.id }}">
<button type="submit" class="button button--primary add-to-cart">Add to Cart</button>
</form>
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?
Thanks in advance!
Best regards,
Adrian
Hi @adkowaty
Can you share store URL?
Hi @adkowaty
Hi,
1. go to the theme customization.
2. Select a Feature collection
3. search for quick add setting and choose the standard option
It will resolve your issue of redirecting to the cart page.
Hi Sam,
I have this option selected, but still do not work. 😕
Regards,
Adrian
Which theme you are using?
Hi Sam,
Dawn version 15.1.0
Regards,
Adrian
I can develop the custom code needed to add items to the drawer from the collection feature page. Please connect with me to discuss further.
Sam,
Sorry no budget, anyway thanks for your interest.
Regards,
Adrian
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025