Skip to content

Commit 158a555

Browse files
author
Olexii Korshenko
committed
MAGETWO-39289: Estimate Shipping and Tax is affects first checkout step(summary bock)
1 parent c29d0bb commit 158a555

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

app/code/Magento/Checkout/view/frontend/web/js/model/step-navigator.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,10 @@ define(
3939
return activeIndex;
4040
},
4141

42-
isAvailable: function(code) {
43-
var flag = false;
44-
this.stepCodes.forEach(function(element){
45-
if (element == code) {
46-
flag = true;
47-
}
48-
});
49-
return flag;
50-
},
51-
5242
isProcessed: function(code) {
5343
var activeItemIndex = this.getActiveItemIndex();
5444
var sortedItems = steps.sort(this.sortItems);
55-
var requestedItemIndex = 0;
45+
var requestedItemIndex = -1;
5646
sortedItems.forEach(function(element, index) {
5747
if (element.code == code) {
5848
requestedItemIndex = index;
@@ -62,9 +52,7 @@ define(
6252
},
6353

6454
navigateTo: function(step) {
65-
var activeItemIndex = this.getActiveItemIndex();
6655
var sortedItems = steps.sort(this.sortItems);
67-
var stepIndex = sortedItems.indexOf(step);
6856
if (!this.isProcessed(step.code)) {
6957
return;
7058
}

app/code/Magento/Checkout/view/frontend/web/js/view/summary/abstract-total.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,17 @@ define(
1414
function (Component, quote, priceUtils, totals, stepNavigator) {
1515
"use strict";
1616
return Component.extend({
17-
shippingAvailableFlag: undefined,
1817
getFormattedPrice: function (price) {
1918
return priceUtils.formatPrice(price, quote.getPriceFormat());
2019
},
2120
getTotals: function() {
2221
return totals.totals();
2322
},
24-
isShippingAvailable: function() {
25-
if (undefined !== this.shippingAvailableFlag) {
26-
return this.shippingAvailableFlag;
27-
}
28-
this.shippingAvailableFlag = stepNavigator.isAvailable('shipping');
29-
return this.shippingAvailableFlag;
30-
},
3123
isFullMode: function() {
3224
if (!this.getTotals()) {
3325
return false;
3426
}
35-
return !this.isShippingAvailable() || stepNavigator.isProcessed('shipping');
27+
return stepNavigator.isProcessed('shipping');
3628
}
3729
});
3830
}

0 commit comments

Comments
 (0)