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 28c7f79 commit bd619a1Copy full SHA for bd619a1
app/code/Magento/Swatches/view/base/web/js/swatch-renderer.js
@@ -465,12 +465,17 @@ define([
465
// Aggregate options array to hash (key => value)
466
$.each(item.options, function () {
467
if (this.products.length > 0) {
468
+ let salableProducts = this.products;
469
+
470
+ if ($widget.options.jsonConfig.canDisplayShowOutOfStockStatus) {
471
+ salableProducts = $widget.options.jsonConfig.salable[item.id][this.id];
472
+ }
473
$widget.optionsMap[item.id][this.id] = {
474
price: parseInt(
475
$widget.options.jsonConfig.optionPrices[this.products[0]].finalPrice.amount,
476
10
477
),
- products: this.products
478
+ products: salableProducts
479
};
480
}
481
});
0 commit comments