Merge pull request #6608 from papnoisanjeev/config-product-regular-price-show-issue
Showing discount to variant of config products for which catalog rule applied only.
This commit is contained in:
commit
7274a47a36
|
|
@ -303,10 +303,15 @@
|
|||
if (this.childAttributes.length == selectedOptionCount) {
|
||||
priceLabelElement.style.display = 'none';
|
||||
|
||||
if (regularPriceElement) {
|
||||
regularPriceElement.style.display = 'none';
|
||||
}
|
||||
|
||||
priceElement.innerHTML = this.config.variant_prices[this.simpleProduct].final_price.formated_price;
|
||||
|
||||
if (regularPriceElement) {
|
||||
if (regularPriceElement && this.config.variant_prices[this.simpleProduct].final_price.price < this.config.variant_prices[this.simpleProduct].regular_price.price) {
|
||||
regularPriceElement.innerHTML = this.config.variant_prices[this.simpleProduct].regular_price.formated_price;
|
||||
regularPriceElement.style.display = 'inline-block';
|
||||
}
|
||||
|
||||
eventBus.$emit('configurable-variant-selected-event', this.simpleProduct)
|
||||
|
|
|
|||
|
|
@ -320,10 +320,15 @@
|
|||
if (this.childAttributes.length == selectedOptionCount) {
|
||||
priceLabelElement.style.display = 'none';
|
||||
|
||||
if (regularPriceElement) {
|
||||
regularPriceElement.style.display = 'none';
|
||||
}
|
||||
|
||||
priceElement.innerHTML = this.config.variant_prices[this.simpleProduct].final_price.formated_price;
|
||||
|
||||
if (regularPriceElement) {
|
||||
if (regularPriceElement && this.config.variant_prices[this.simpleProduct].final_price.price < this.config.variant_prices[this.simpleProduct].regular_price.price) {
|
||||
regularPriceElement.innerHTML = this.config.variant_prices[this.simpleProduct].regular_price.formated_price;
|
||||
regularPriceElement.style.display = 'inline-block';
|
||||
}
|
||||
|
||||
eventBus.$emit('configurable-variant-selected-event', this.simpleProduct)
|
||||
|
|
|
|||
Loading…
Reference in New Issue