From eb2ec29a03e2d7cb6adde7c0c01efa06d9b53d47 Mon Sep 17 00:00:00 2001 From: Sergey Semenov Date: Tue, 29 Nov 2016 20:00:12 +0200 Subject: [PATCH] MAGETWO-56998: [Backport] Simple child product without a special price still shown as "was (original price)" #4442 #5097 #6645 - for 2.1 --- .../Swatches/view/frontend/web/js/swatch-renderer.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js b/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js index dfd4b2bb2da0f..8b61601f7250f 100644 --- a/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js +++ b/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js @@ -191,7 +191,10 @@ define([ mediaGalleryInitial: [{}], // - onlyMainImg: false + onlyMainImg: false, + + // sly-old-price block selector + slyOldPriceSelector: '.sly-old-price' }, /** @@ -688,6 +691,11 @@ define([ } ); + if (result.oldPrice.amount !== result.finalPrice.amount) { + $(this.options.slyOldPriceSelector).show(); + } else { + $(this.options.slyOldPriceSelector).hide(); + } }, /**