How can I add Add to cart button on collection page

Shivam96
Excursionist
21 0 1

Hi,

I added this code on the product grid liquid to add add to cart button on collection page.

But its opening cart page instead of side popup cart. what i can do? I tried everything.

Url - www.holief.com

<form method="post" action="/cart/add">

<input type="hidden" name="id" value="{{ product.variants.first.id }}" />

<input type="hidden" name="return_to" value="back" />

<input min="1" type="number" id="quantity" name="quantity" value="1" />

<input type="submit" value="Add to cart" class="btn collectionCartbtn" />

</form>

Replies 9 (9)
dmwwebartisan
Shopify Partner
9826 2238 3081

@Shivam96 

This js and liquid code customization work .

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | Bag is a cart drawer that maximizes your sales. View app →
Shivam96
Excursionist
21 0 1

Can you please assist me @dmwwebartisan 

dmwwebartisan
Shopify Partner
9826 2238 3081

@Shivam96 

Please share your theme.zip file i will check your theme code and send solution to you.

Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | Bag is a cart drawer that maximizes your sales. View app →
Shivam96
Excursionist
21 0 1

Sending, please check email. @dmwwebartisan 

Shivam96
Excursionist
21 0 1

@dmwwebartisan Hi Dmw, any resolve on this? already sent the zip to you.

dmwwebartisan
Shopify Partner
9826 2238 3081

@Shivam96 

please wait today . i will check and send solution.

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | Bag is a cart drawer that maximizes your sales. View app →
Shivam96
Excursionist
21 0 1
Shivam96
Excursionist
21 0 1

Hi @dmwwebartisan Let me know please if you didn't got the mail, I'll send the zip again.