Merge pull request #5048 from devansh-webkul/add-to-cart-button-issue

Fixed add to cart button which is not working in compare page for default theme #5046
This commit is contained in:
Jitendra Singh 2021-08-06 14:25:13 +05:30 committed by GitHub
commit 20021e5be1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -68,7 +68,15 @@
@case('addToCartHtml')
<div class="action">
<div v-html="product.addToCartHtml"></div>
<form :action="`${baseUrl}/checkout/cart/add/${product.product_id}`" method="POST">
@csrf
<input type="hidden" name="product_id" :value="product.product_id">
<input type="hidden" name="quantity" value="1">
<div v-html="product.addToCartHtml"></div>
</form>
<span class="icon white-cross-sm-icon remove-product" @click="removeProductCompare(product.id)"></span>
</div>