Need help on Add To Cart button

Highlighted
New Member
1 0 0

Need help Setting up Add To Cart Button on Each product on the websites home page. You need to go through the catalog to add to cart , but I want it on the home page as well. Any help is very appreciated. Thank you! 

0 Likes
Highlighted
Shopify Partner
1012 209 253

Hello,

Add this code to the location where you want to add button

 <form class="product-form" action="/cart/add" data-productid="{{product.id}}"  method="post"> 
<div class="add-to-cart">
        {% if product.available %}
          <div class="product-form-submit-wrap">
            <input type="submit" value="{{ 'products.product.add_to_cart' | t }}" />
          </div>
        {% else %}
          <input type="button" class="disabled" disabled="disabled" value="{{ 'products.product.sold_out' | t }}" />
        {% endif %}
      </div>
</form>

 

Note: You need to adjust html a/to the theme you are using.

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