Skip to content

Commit f20117e

Browse files
author
Oleksii Korshenko
committed
MAGETWO-62136: Prepare code base for 2.1.4
- fixed merge issue
1 parent 1e91b62 commit f20117e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,10 @@ define([
204204
*
205205
* @type {String}
206206
*/
207-
gallerySwitchStrategy: 'replace'
207+
gallerySwitchStrategy: 'replace',
208+
209+
// sly-old-price block selector
210+
slyOldPriceSelector: '.sly-old-price'
208211
},
209212

210213
/**
@@ -707,6 +710,12 @@ define([
707710
'prices': $widget._getPrices(result, $productPrice.priceBox('option').prices)
708711
}
709712
);
713+
714+
if (result.oldPrice.amount !== result.finalPrice.amount) {
715+
$(this.options.slyOldPriceSelector).show();
716+
} else {
717+
$(this.options.slyOldPriceSelector).hide();
718+
}
710719
},
711720

712721
/**

0 commit comments

Comments
 (0)