Skip to content

Commit

Permalink
ENGCOM-4477: [Backport] 19276 - Fixed price renderer issue #21695
Browse files Browse the repository at this point in the history
  • Loading branch information
sidolov authored Mar 14, 2019
2 parents eb8fd3e + ea9b1b7 commit 334cf17
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,8 @@ define([
$productPrice = $product.find(this.options.selectorProductPrice),
options = _.object(_.keys($widget.optionsMap), {}),
result,
tierPriceHtml;
tierPriceHtml,
isShow;

$widget.element.find('.' + $widget.options.classes.attributeClass + '[option-selected]').each(function () {
var attributeId = $(this).attr('attribute-id');
Expand All @@ -935,11 +936,9 @@ define([
}
);

if (typeof result != 'undefined' && result.oldPrice.amount !== result.finalPrice.amount) {
$(this.options.slyOldPriceSelector).show();
} else {
$(this.options.slyOldPriceSelector).hide();
}
isShow = typeof result != 'undefined' && result.oldPrice.amount !== result.finalPrice.amount;

$product.find(this.options.slyOldPriceSelector)[isShow ? 'show' : 'hide']();

if (typeof result != 'undefined' && result.tierPrices.length) {
if (this.options.tierPriceTemplate) {
Expand Down

0 comments on commit 334cf17

Please sign in to comment.