diff --git a/packages/Webkul/Shop/src/Resources/views/products/view/configurable-options.blade.php b/packages/Webkul/Shop/src/Resources/views/products/view/configurable-options.blade.php index e971ef29c..54778d8d0 100755 --- a/packages/Webkul/Shop/src/Resources/views/products/view/configurable-options.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/view/configurable-options.blade.php @@ -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) diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/products/view/configurable-options.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/products/view/configurable-options.blade.php index 56a8e4143..4e5c82333 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/products/view/configurable-options.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/products/view/configurable-options.blade.php @@ -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)