Skip to content

Commit

Permalink
ENGCOM-4856: [Backport] [Fixed] Checkout Section: Shipping step is ge…
Browse files Browse the repository at this point in the history
…tting skipped when customer hitting direct payment step URL #22543
  • Loading branch information
sidolov authored May 2, 2019
2 parents b7db604 + 6dcbeae commit f9338a3
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions app/code/Magento/Checkout/view/frontend/web/js/view/payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,21 @@ define([
navigate: function () {
var self = this;

getPaymentInformation().done(function () {
self.isVisible(true);
});
if (!self.hasShippingMethod()) {
this.isVisible(false);
stepNavigator.setHash('shipping');
} else {
getPaymentInformation().done(function () {
self.isVisible(true);
});
}
},

/**
* @return {Boolean}
*/
hasShippingMethod: function () {
return window.checkoutConfig.selectedShippingMethod !== null;
},

/**
Expand Down

0 comments on commit f9338a3

Please sign in to comment.