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
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024