Skip to content

Commit d8d8fed

Browse files
committed
Use final price rather than base price to calculate price increases / decreases on the configurable attribute dropdown. This fixes a bug introduced in PR #17695 as detailed on issue #22270
1 parent 45a6365 commit d8d8fed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ define([
373373
allowedProducts,
374374
i,
375375
j,
376-
basePrice = parseFloat(this.options.spConfig.prices.basePrice.amount),
376+
finalPrice = parseFloat(this.options.spConfig.prices.finalPrice.amount),
377377
optionFinalPrice,
378378
optionPriceDiff,
379379
optionPrices = this.options.spConfig.optionPrices,
@@ -410,7 +410,7 @@ define([
410410
typeof optionPrices[allowedProducts[0]] !== 'undefined') {
411411
allowedProductMinPrice = this._getAllowedProductWithMinPrice(allowedProducts);
412412
optionFinalPrice = parseFloat(optionPrices[allowedProductMinPrice].finalPrice.amount);
413-
optionPriceDiff = optionFinalPrice - basePrice;
413+
optionPriceDiff = optionFinalPrice - finalPrice;
414414

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

0 commit comments

Comments
 (0)