Skip to content

Commit 4e52ac8

Browse files
MAGETWO-57140: CLONE - [GitHub] Wrong initialization sequence in mage.priceBox widget (price-box.js) #6117 FOR 2.2
1 parent 3429859 commit 4e52ac8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/code/Magento/Catalog/view/base/web/js/price-box.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ define([
7373
var prices = this.cache.displayPrices,
7474
additionalPrice = {},
7575
pricesCode = [],
76-
priceValue, origin, final;
76+
priceValue, origin, finalPrice;
7777

7878
this.cache.additionalPriceObject = this.cache.additionalPriceObject || {};
7979

@@ -114,15 +114,15 @@ define([
114114
} else {
115115
_.each(additionalPrice, function (option, priceCode) {
116116
origin = this.options.prices[priceCode] || {};
117-
final = prices[priceCode] || {};
117+
finalPrice = prices[priceCode] || {};
118118
option.amount = option.amount || 0;
119119
origin.amount = origin.amount || 0;
120120
origin.adjustments = origin.adjustments || {};
121-
final.adjustments = final.adjustments || {};
121+
finalPrice.adjustments = finalPrice.adjustments || {};
122122

123-
final.amount = 0 + origin.amount + option.amount;
123+
finalPrice.amount = 0 + origin.amount + option.amount;
124124
_.each(option.adjustments, function (pa, paCode) {
125-
final.adjustments[paCode] = 0 + (origin.adjustments[paCode] || 0) + pa;
125+
finalPrice.adjustments[paCode] = 0 + (origin.adjustments[paCode] || 0) + pa;
126126
});
127127
}, this);
128128
}

0 commit comments

Comments
 (0)