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 ec5a7f5 commit eb2ec29Copy full SHA for eb2ec29
app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js
@@ -191,7 +191,10 @@ define([
191
mediaGalleryInitial: [{}],
192
193
//
194
- onlyMainImg: false
+ onlyMainImg: false,
195
+
196
+ // sly-old-price block selector
197
+ slyOldPriceSelector: '.sly-old-price'
198
},
199
200
/**
@@ -688,6 +691,11 @@ define([
688
691
}
689
692
);
690
693
694
+ if (result.oldPrice.amount !== result.finalPrice.amount) {
695
+ $(this.options.slyOldPriceSelector).show();
696
+ } else {
697
+ $(this.options.slyOldPriceSelector).hide();
698
+ }
699
700
701
0 commit comments