Skip to content

Commit f3f22ba

Browse files
committed
ACP2E-1764: Configurable product price is not changed when option is selected
- Fixed the static test failure.
1 parent ec0775c commit f3f22ba

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -591,13 +591,16 @@ define([
591591
_getPrices: function () {
592592
var prices = {},
593593
elements = _.toArray(this.options.settings),
594-
allowedProduct;
594+
allowedProduct,
595+
selected,
596+
config,
597+
priceValue;
595598

596599
_.each(elements, function (element) {
597600
if (element.options) {
598-
var selected = element.options[element.selectedIndex],
599-
config = selected && selected.config,
600-
priceValue = this._calculatePrice({});
601+
selected = element.options[element.selectedIndex];
602+
config = selected && selected.config;
603+
priceValue = this._calculatePrice({});
601604

602605
if (config && config.allowedProducts.length === 1) {
603606
priceValue = this._calculatePrice(config);

0 commit comments

Comments
 (0)