Envy Theme: Add to Cart button on Collection Page

Highlighted
New Member
3 0 0

Hello,

I'm using the Envy theme on Shopify by WeTheme and would like to show the Add to Cart button on the Collection Page and enable customers to add several items to cart (showing items in cart drawer) before checking out. Currently I have to click into the individual Product page and Add to Cart and go back to the Collection Page again to add more items which is a bummer. Appreciate any help I can get!

Thank you!

0 Likes
Highlighted
Shopify Partner
1158 233 300

Hello @Vin89 ,

Here is code you can use ( keep noted you have to use in collection template or related file a/to the structure of the theme you are using )

<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> 

 Also this will give the option to put product in cart but will not work as your single product 'add to cart' working. And to make that you have to adjust the code a/to the theme existing code. 

Thanks

Want to modify or custom changes on store hire me.
My Email: guleriathakur43@gmail.com
Skype: navrocks1
If helpful then please Like and Accept Solution.
If you are happy and want to donate small Click here (Its my paypal)
0 Likes
Highlighted
New Member
3 0 0

Hi Guleria,

 

Thanks for this. The code works when I added it to the Product Grid template and shows the “Add to Cart” button on the collection page but when I click “Add to Cart” it goes to an error page and the cart drawer doesn’t appear How do I tweak to allow the product to show in the “Add to Cart” drawer column? I’m thinking there should be another code to tweak so it does not return an error

 

Much thanks!

Vin

0 Likes