Skip to content

Commit

Permalink
Fix #28270 Showed tier price for pre selected config swatch via cart
Browse files Browse the repository at this point in the history
  • Loading branch information
srsathish92 committed Jul 15, 2020
1 parent 878b1c9 commit 2765164
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ define([
if ($(this.element).attr('data-rendered')) {
return;
}

$(this.element).attr('data-rendered', true);

if (_.isEmpty(this.options.jsonConfig.images)) {
Expand All @@ -320,6 +321,8 @@ define([
this._debouncedLoadProductMedia = _.debounce(this._LoadProductMedia.bind(this), 500);
}

this.options.tierPriceTemplate = $(this.options.tierPriceTemplateSelector).html();

if (this.options.jsonConfig !== '' && this.options.jsonSwatchConfig !== '') {
// store unsorted attributes
this.options.jsonConfig.mappedAttributes = _.clone(this.options.jsonConfig.attributes);
Expand All @@ -330,7 +333,6 @@ define([
} else {
console.log('SwatchRenderer: No input data received');
}
this.options.tierPriceTemplate = $(this.options.tierPriceTemplateSelector).html();
},

/**
Expand Down

0 comments on commit 2765164

Please sign in to comment.