Skip to content

Commit 14beb38

Browse files
🔃 [EngCom] Public Pull Requests - 2.1-develop
Accepted Public Pull Requests: - #14911: [Backport] Switch updatecart qty input validators to dynamic (by @rogyar) - #14899: [Backport] Disable add to cart button when redirect to cart enabled (by @rogyar)
2 parents 3f08314 + 278bf4e commit 14beb38

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
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; ?>

app/code/Magento/Checkout/view/frontend/templates/cart/item/configure/updatecart.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<div class="control">
2020
<input type="number" name="qty" id="qty" maxlength="12" value=""
2121
title="<?php echo $block->escapeHtml(__('Qty')); ?>"
22-
class="input-text qty" data-validate="{'required-number':true,digits:true}"/>
22+
class="input-text qty" data-validate="<?= $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/>
2323
</div>
2424
</div>
2525
<?php endif; ?>

0 commit comments

Comments
 (0)