Skip to content

Commit 965bb72

Browse files
MC-36088: Non-relevant shipping method available for checkout
1 parent 2b918da commit 965bb72

File tree

1 file changed

+6
-5
lines changed
  • app/code/Magento/Checkout/view/frontend/web/js/view

1 file changed

+6
-5
lines changed

app/code/Magento/Checkout/view/frontend/web/js/view/shipping.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,16 +299,17 @@ define([
299299
this.source.set('params.invalid', false);
300300
this.triggerShippingDataValidateEvent();
301301

302+
if (!quote.shippingMethod()['method_code']) {
303+
this.errorValidationMessage(
304+
$t('The shipping method is missing. Select the shipping method and try again.')
305+
);
306+
}
307+
302308
if (emailValidationResult &&
303309
this.source.get('params.invalid') ||
304310
!quote.shippingMethod()['method_code'] ||
305311
!quote.shippingMethod()['carrier_code']
306312
) {
307-
if (!quote.shippingMethod()['method_code']) {//eslint-disable-line max-depth
308-
this.errorValidationMessage(
309-
$t('The shipping method is missing. Select the shipping method and try again.')
310-
);
311-
}
312313
this.focusInvalid();
313314

314315
return false;

0 commit comments

Comments
 (0)