Add to Cart Button on Collection List Page on Debut Theme

Shopify Partner
24 0 0

I need the Add to Cart button for each item on a Collection list page.  This way, the customer can go down the list and add whatever they want to the cart without looking at the product's page or going to the cart after adding each item.  I've read through posts from the past 2 years and they all point to pages and divs that no longer exist in my theme.

 

I tried adding the button to the product-card-grid.liquid but that did nothing.  In fact, I commented out all of the code on that page and nothing changed on my site.  So that file must be pointless.  I also tried fooling with the collection-grid-item.liquid file and that did nothing either.  I know the button code works because I added it to some random page where it shouldn't be located, just to see if it works.

 

<form method="post" action="/cart/add">
<input type="hidden" name="id" value="{{ product.variants.first.id }}" />

<input type="submit" value="Add to cart" class="btn" />
<input type="hidden" name="return_to" value="back" />
</form>

0 Likes
Excursionist
44 0 4

Can someone please give the solution? I need this asap!

0 Likes
Shopify Partner
1517 267 323

i have checked your code is ok and need to place in snippet->product-card-grid.liquid,

but in this file find "full-width-link" class and remove this.

Let me know if you need help.

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
0 Likes
Highlighted
Excursionist
44 0 4

Great! That worked! However, I did not see the "full-width-link' class though. 

Besides, the button is now on the left side under the thumbnail, I would like to have it centered. And I would like to create some padding space underneath the button, because now it is attached to the thumbnail of the product underneath. 

 

:))

0 Likes
Shopify Partner
1517 267 323

Send me your store url and password if any here or on mail,Skype. 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
0 Likes