diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/step-navigator.js b/app/code/Magento/Checkout/view/frontend/web/js/model/step-navigator.js index d0e71d6ab8541ff433093e86a0c3234963719696..0ce40c7999a80c32cfdb08b3c0ece8a261df3bdb 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/step-navigator.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/step-navigator.js @@ -39,20 +39,10 @@ define( return activeIndex; }, - isAvailable: function(code) { - var flag = false; - this.stepCodes.forEach(function(element){ - if (element == code) { - flag = true; - } - }); - return flag; - }, - isProcessed: function(code) { var activeItemIndex = this.getActiveItemIndex(); var sortedItems = steps.sort(this.sortItems); - var requestedItemIndex = 0; + var requestedItemIndex = -1; sortedItems.forEach(function(element, index) { if (element.code == code) { requestedItemIndex = index; @@ -62,9 +52,7 @@ define( }, navigateTo: function(step) { - var activeItemIndex = this.getActiveItemIndex(); var sortedItems = steps.sort(this.sortItems); - var stepIndex = sortedItems.indexOf(step); if (!this.isProcessed(step.code)) { return; } diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/summary/abstract-total.js b/app/code/Magento/Checkout/view/frontend/web/js/view/summary/abstract-total.js index 7dd30b89032f00709f63930113ce59aee9faa5e0..35a4b0071d724572aefb3cc1faaeee68123f3606 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/summary/abstract-total.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/summary/abstract-total.js @@ -14,25 +14,17 @@ define( function (Component, quote, priceUtils, totals, stepNavigator) { "use strict"; return Component.extend({ - shippingAvailableFlag: undefined, getFormattedPrice: function (price) { return priceUtils.formatPrice(price, quote.getPriceFormat()); }, getTotals: function() { return totals.totals(); }, - isShippingAvailable: function() { - if (undefined !== this.shippingAvailableFlag) { - return this.shippingAvailableFlag; - } - this.shippingAvailableFlag = stepNavigator.isAvailable('shipping'); - return this.shippingAvailableFlag; - }, isFullMode: function() { if (!this.getTotals()) { return false; } - return !this.isShippingAvailable() || stepNavigator.isProcessed('shipping'); + return stepNavigator.isProcessed('shipping'); } }); }