Skip to content

Commit 2765164

Browse files
committed
Fix #28270 Showed tier price for pre selected config swatch via cart
1 parent 878b1c9 commit 2765164

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ define([
311311
if ($(this.element).attr('data-rendered')) {
312312
return;
313313
}
314+
314315
$(this.element).attr('data-rendered', true);
315316

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

324+
this.options.tierPriceTemplate = $(this.options.tierPriceTemplateSelector).html();
325+
323326
if (this.options.jsonConfig !== '' && this.options.jsonSwatchConfig !== '') {
324327
// store unsorted attributes
325328
this.options.jsonConfig.mappedAttributes = _.clone(this.options.jsonConfig.attributes);
@@ -330,7 +333,6 @@ define([
330333
} else {
331334
console.log('SwatchRenderer: No input data received');
332335
}
333-
this.options.tierPriceTemplate = $(this.options.tierPriceTemplateSelector).html();
334336
},
335337

336338
/**

0 commit comments

Comments
 (0)