We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4992141 commit 9b9d451Copy full SHA for 9b9d451
app/code/Magento/Checkout/view/frontend/web/js/view/payment.js
@@ -66,9 +66,21 @@ define([
66
navigate: function () {
67
var self = this;
68
69
- getPaymentInformation().done(function () {
70
- self.isVisible(true);
71
- });
+ if(!self.hasShippingMethod()) {
+ this.isVisible(false);
+ 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;
84
},
85
86
/**
0 commit comments