Skip to content

Commit 47bad3e

Browse files
author
Ievgen Shakhsuvarov
committed
MAGETWO-32078: Validation for Terms and Conditions should be the same for OnePage Checkout and Multishipping Flow
1 parent 3ffc380 commit 47bad3e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
<script type="text/javascript">
4545
require([
4646
"jquery",
47-
"mage/mage"
47+
"mage/mage",
48+
"Magento_Catalog/product/view/validation"
4849
], function($){
4950
$('#product_addtocart_form').mage('validation', {
5051
radioCheckboxClosest: '.nested'

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
<script type="text/javascript">
3636
require([
3737
'jquery',
38-
'Magento_Catalog/js/price-box'
38+
'Magento_Catalog/js/price-box',
39+
'Magento_Catalog/product/view/validation'
3940
], function($){
4041
var priceBoxes = $('[data-role=priceBox]');
4142

app/code/Magento/Checkout/view/frontend/web/js/opc-order-review.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ define([
3636
var isAgreementValid = true;
3737
agreementFormsGroup.find('form').each(
3838
function(){
39-
$(this).validation();
40-
isAgreementValid = isAgreementValid && $(this).validation && $(this).validation('isValid');
39+
isAgreementValid = $(this).validation() && $(this).validation('isValid') && isAgreementValid;
4140
}
4241
);
4342

0 commit comments

Comments
 (0)