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(); + } }, /**