Adding the ADD TO CART button on a collection page

New Member
1 0 0

Hi everyone,

 

I am using the Blockshop theme by troop. I would like to add an 'Add to Cart' button to collection pages so that people don't have to go all the way to a product page. I have seen this on other sites using the same theme, but can't find out how to make it appear on mine. 

 

Thanks!

0 Likes
Shopify Expert
2474 415 522

Hi @MFCO 

You need code knowledge for that,

1. open snippet->product-grid.liquid file(May be its different for custom theme)

add this code next to title:

<form method="post" action="/cart/add">
  <input type="hidden" name="id" value="{{ product.variants.first.id }}" />
  <input min="1" type="number" id="quantity" name="quantity" value="1"/>
  <input type="submit" value="Add to cart" class="btn" />
</form> 
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
Want to get Free review and advice for sale on store ?? just text me here
0 Likes