add to cart button is not working on home page

zurain
Excursionist
24 0 5

<div class="container">

<div class="row">

<div class="col-lg-6">
<a href="{{ section.settings.First_product_url }}">
<img src="{{ section.settings.First_product | img_url: '600x' }}"/>
</a>
<form method="post" action="/cart/add">
<input type="hidden" name="id" value="{{ product.variants.first.id }}" />
<input class="inputcart" min="1" max="" type="number" id="quantity" name="quantity" value="1"/>
<input type="submit" value="Add to cart" class="btn crt" />
</form>
</div>

<div class="col-lg-6">

<div class="row">

<div class="col-lg-6">
<a href="{{ section.second_product_url }}">
<img src="{{ section.settings.second_product | img_url: '600x' }}"/>
</a>
<form method="post" action="/cart/add">
<input type="hidden" name="id" value="{{ product.variants.first.id }}" />
<input class="inputcart" min="1" max="" type="number" name="quantity" id="quantity" value="1"/>
<input type="submit" value="Add to cart" class="btn crt" />
</form>

</div>

</div>

</div>

</div>

</div>

{% schema %}
{
"name": "product_saphire",
"settings": [

{
"type":"product",
"id":"First_product",
"label":"select product"
},
{
"type":"url",
"id":"First_product_url",
"label":"First product url"
},
{
"type":"product",
"id":"second_product",
"label":"select product"
},
{
"type":"url",
"id":"second_product_url",
"label":"Second product url"
}


],
"presets": [
{
"name": "product_saphire",
"category": "ADVANCED LAYOUT"
}
]

}
{% endschema %}

{% stylesheet %}
{% endstylesheet %}

{% javascript %}
{% endjavascript %}

0 Likes