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
The year-end shopping spree is around the corner! Is your online store ready for the ...
By JasonH Nov 10, 2024We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024