Adding Add to Cart button under recommendation products

Highlighted
New Member
16 0 0

What we are trying to do is add a "Add to Cart" button to our recommendations section under each product BUT when they hit Add to Cart we want to use the drawer cart instead of redirecting them to the cart. We use the Prestige theme.

 

                <form class="RecommendationsForm__AddToCart Button" action="/cart/add" data-productid="{{product.id}}"  method="post"> 
                        <input type="hidden" name="id" data-productid="{{product.id}}" class="RecommendationsForm__AddToCart" value="{{ product.variants[0].id }}" data-variant-title="{{ product.variants[0].title }}" />
                        <input type="submit" value="Add To Cart" class="RecommendationsForm__AddToCart Button" /></form>

This is the code we currently use but that redirects them to the cart page.

0 Likes
Highlighted
Shopify Partner
900 193 347

@Dan_Haynes 

 

Send me your store url so, I can take a look and assist you better.

 

Thank you,

Tejas

Shopify Expert | Skype: tejas.nadpara
- Like and Mark as an Accepted Solution if reply helpful
- Feel free to contact me on support@hexaecommerce.com regarding any help
0 Likes
Highlighted
New Member
1 0 0

I have the same problem. Did you find a solution?

0 Likes