Skip to content

Commit

Permalink
Use final price rather than base price to calculate price increases /…
Browse files Browse the repository at this point in the history
… decreases on the configurable attribute dropdown. This fixes a bug introduced in PR magento#17695 as detailed on issue magento#22270
  • Loading branch information
danielpfarmer committed Apr 23, 2019
1 parent 45a6365 commit d8d8fed
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ define([
allowedProducts,
i,
j,
basePrice = parseFloat(this.options.spConfig.prices.basePrice.amount),
finalPrice = parseFloat(this.options.spConfig.prices.finalPrice.amount),
optionFinalPrice,
optionPriceDiff,
optionPrices = this.options.spConfig.optionPrices,
Expand Down Expand Up @@ -410,7 +410,7 @@ define([
typeof optionPrices[allowedProducts[0]] !== 'undefined') {
allowedProductMinPrice = this._getAllowedProductWithMinPrice(allowedProducts);
optionFinalPrice = parseFloat(optionPrices[allowedProductMinPrice].finalPrice.amount);
optionPriceDiff = optionFinalPrice - basePrice;
optionPriceDiff = optionFinalPrice - finalPrice;

if (optionPriceDiff !== 0) {
options[i].label = options[i].label + ' ' + priceUtils.formatPrice(
Expand Down

0 comments on commit d8d8fed

Please sign in to comment.