Skip to content

Commit

Permalink
ENGCOM-4783: [Fixed] Checkout Section: Shipping step is getting skipp…
Browse files Browse the repository at this point in the history
…ed when customer hitting direct payment step URL #22405
  • Loading branch information
sivaschenko authored Apr 28, 2019
2 parents dcccadc + 33e10ef commit 1e1f690
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 1e1f690

Please sign in to comment.