Skip to content

Commit fd5f40a

Browse files
committed
8410: Custom Checkout Step and Shipping Step are Highlighted
1 parent 276c690 commit fd5f40a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,18 @@ define([
4646

4747
/** @inheritdoc */
4848
initialize: function () {
49+
var self = this;
4950
this._super();
5051
checkoutDataResolver.resolvePaymentMethod();
52+
53+
//If some step is active this step will become inactive.
54+
stepNavigator.steps().some(function (element) {
55+
if (element.isVisible()) {
56+
self.isVisible(false);
57+
return true;
58+
}
59+
});
60+
5161
stepNavigator.registerStep(
5262
'payment',
5363
null,

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ define([
8282
this._super();
8383

8484
if (!quote.isVirtual()) {
85+
//If some step is active this step will become inactive.
86+
stepNavigator.steps().some(function (element) {
87+
if (element.isVisible()) {
88+
self.visible(false);
89+
return true;
90+
}
91+
});
92+
8593
stepNavigator.registerStep(
8694
'shipping',
8795
'',

0 commit comments

Comments
 (0)