Skip to content

Commit 3cfe20d

Browse files
committed
Disable add to cart button when redirect to cart enabled
1 parent f130812 commit 3cfe20d

File tree

1 file changed

+1
-13
lines changed
  • app/code/Magento/Catalog/view/frontend/templates/product/view

1 file changed

+1
-13
lines changed

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,10 @@
4040
</div>
4141
</div>
4242
<?php endif; ?>
43-
<?php if ($block->isRedirectToCartEnabled()) : ?>
44-
<script type="text/x-magento-init">
45-
{
46-
"#product_addtocart_form": {
47-
"Magento_Catalog/product/view/validation": {
48-
"radioCheckboxClosest": ".nested"
49-
}
50-
}
51-
}
52-
</script>
53-
<?php else : ?>
54-
<script type="text/x-magento-init">
43+
<script type="text/x-magento-init">
5544
{
5645
"#product_addtocart_form": {
5746
"Magento_Catalog/js/validate-product": {}
5847
}
5948
}
6049
</script>
61-
<?php endif; ?>

0 commit comments

Comments
 (0)