Skip to content

Commit 3b6e159

Browse files
author
Dmytro Voskoboinikov
committed
MAGETWO-71515: Special/lowest price in child of a Configurable Product causes the entire product to show that price
1 parent c296f2e commit 3b6e159

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,11 @@ define([
268268
// tier prise selectors start
269269
tierPriceTemplateSelector: '#tier-prices-template',
270270
tierPriceBlockSelector: '[data-role="tier-price-block"]',
271-
tierPriceTemplate: ''
271+
tierPriceTemplate: '',
272272
// tier prise selectors end
273+
274+
// A price label selector
275+
normalPriceLabelSelector: '.normal-price .price-label'
273276
},
274277

275278
/**
@@ -924,6 +927,14 @@ define([
924927
} else {
925928
$(this.options.tierPriceBlockSelector).hide();
926929
}
930+
931+
$(this.options.normalPriceLabelSelector).hide();
932+
933+
_.each($('.' + this.options.classes.attributeOptionsWrapper), function (element) {
934+
if ($(element).find('.' + this.options.classes.optionClass + '.selected').length === 0) {
935+
$(this.options.normalPriceLabelSelector).show();
936+
}
937+
}.bind(this));
927938
},
928939

929940
/**

0 commit comments

Comments
 (0)