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
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024