Skip to content
Snippets Groups Projects
Commit 12bbd395 authored by Olexii Korshenko's avatar Olexii Korshenko
Browse files

MAGETWO-38611: No validation message is shipping rate is not set

parent 6e376c6c
No related merge requests found
......@@ -69,6 +69,7 @@ define(
template: 'Magento_Checkout/shipping'
},
visible: ko.observable(!quote.isVirtual()),
errorValidationMessage: ko.observable(false),
isCustomerLoggedIn: customer.isLoggedIn,
isFormPopUpVisible: formPopUpState.isVisible,
isFormInline: addressList().length == 0,
......@@ -100,12 +101,16 @@ define(
stepNavigator.registerStep('shipping', 'Shipping', this.visible, 10);
}
this.isFormPopUpVisible.subscribe(function(value) {
this.isFormPopUpVisible.subscribe(function (value) {
if (value) {
self.getPopUp().openModal();
}
});
quote.shippingMethod.subscribe(function (value) {
self.errorValidationMessage(false);
});
return this;
},
......@@ -195,7 +200,7 @@ define(
emailValidationResult = customer.isLoggedIn();
if (!quote.shippingMethod()) {
alert($t('Please specify a shipping method'));
this.errorValidationMessage('Please specify a shipping method');
return false;
}
......
......@@ -126,6 +126,11 @@
<!-- ko template: getTemplate() --><!-- /ko -->
<!-- /ko -->
</div>
<!-- ko if: errorValidationMessage().length > 0 -->
<div class="message notice">
<span><!-- ko text: $t(errorValidationMessage())--><!-- /ko --></span>
</div>
<!-- /ko -->
<div class="actions-toolbar" id="shipping-method-buttons-container">
<div class="primary">
<button data-role="opc-continue" type="submit" class="button action continue primary">
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment