Skip to content

Commit 9b9d451

Browse files
niravkrishsaphaljha
niravkrish
authored andcommitted
fixed - issue 21596
1 parent 4992141 commit 9b9d451

File tree

1 file changed

+15
-3
lines changed
  • app/code/Magento/Checkout/view/frontend/web/js/view

1 file changed

+15
-3
lines changed

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,21 @@ define([
6666
navigate: function () {
6767
var self = this;
6868

69-
getPaymentInformation().done(function () {
70-
self.isVisible(true);
71-
});
69+
if(!self.hasShippingMethod()) {
70+
this.isVisible(false);
71+
stepNavigator.setHash('shipping');
72+
} else {
73+
getPaymentInformation().done(function () {
74+
self.isVisible(true);
75+
});
76+
}
77+
},
78+
79+
/**
80+
* @return {Boolean}
81+
*/
82+
hasShippingMethod: function () {
83+
return window.checkoutConfig.selectedShippingMethod !== null;
7284
},
7385

7486
/**

0 commit comments

Comments
 (0)