Skip to content

Commit f0901f6

Browse files
committed
Fix Add to Cart
Fix Add to Cart
1 parent 22a7462 commit f0901f6

File tree

1 file changed

+6
-5
lines changed
  • app/code/Magento/Catalog/view/frontend/templates/product/view

1 file changed

+6
-5
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,22 @@
4040
</div>
4141
</div>
4242
<?php endif; ?>
43+
<?php if (!$block->isRedirectToCartEnabled()) : ?>
4344
<script type="text/x-magento-init">
4445
{
4546
"#product_addtocart_form": {
46-
"Magento_Catalog/product/view/validation": {
47-
"radioCheckboxClosest": ".nested"
47+
"catalogAddToCart": {
48+
"bindSubmit": true
4849
}
4950
}
5051
}
5152
</script>
52-
<?php if (!$block->isRedirectToCartEnabled()) : ?>
53+
<?php else: ?>
5354
<script type="text/x-magento-init">
5455
{
5556
"#product_addtocart_form": {
56-
"catalogAddToCart": {
57-
"bindSubmit": true
57+
"Magento_Catalog/product/view/validation": {
58+
"radioCheckboxClosest": ".nested"
5859
}
5960
}
6061
}

0 commit comments

Comments
 (0)