I want to add “add to cart” button on every product being observed on product list page. I am able to find add to cart option only on product page and not on collection pages where products are listed. How to get that done?
1 Like
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community! ![]()
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
You have to edit product-template.liquid file
Not working this solution.
you need to customize liquid file required some coding work
thanks for url can you please try thsi
Just follow the steps for the Debut theme for Add to cart button on collection pages.
-
From Shopify Admin select Online Store and click on Themes
-
Choose your main theme
-
Click the . . . on the top left-right (see below) and hit Edit code
-
Open Snippets → product-card-grid.liquid File and paste below code at the end of the page.
<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>