We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e91b62 commit f20117eCopy full SHA for f20117e
app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js
@@ -204,7 +204,10 @@ define([
204
*
205
* @type {String}
206
*/
207
- gallerySwitchStrategy: 'replace'
+ gallerySwitchStrategy: 'replace',
208
+
209
+ // sly-old-price block selector
210
+ slyOldPriceSelector: '.sly-old-price'
211
},
212
213
/**
@@ -707,6 +710,12 @@ define([
707
710
'prices': $widget._getPrices(result, $productPrice.priceBox('option').prices)
708
711
}
709
712
);
713
714
+ if (result.oldPrice.amount !== result.finalPrice.amount) {
715
+ $(this.options.slyOldPriceSelector).show();
716
+ } else {
717
+ $(this.options.slyOldPriceSelector).hide();
718
+ }
719
720
721
0 commit comments