Skip to content

Commit 912b787

Browse files
Merge remote-tracking branch 'magento-l3/ACP2E-1334' into PR-L3-21-02-2023
2 parents 449a37e + bd619a1 commit 912b787

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,12 +465,17 @@ define([
465465
// Aggregate options array to hash (key => value)
466466
$.each(item.options, function () {
467467
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+
}
468473
$widget.optionsMap[item.id][this.id] = {
469474
price: parseInt(
470475
$widget.options.jsonConfig.optionPrices[this.products[0]].finalPrice.amount,
471476
10
472477
),
473-
products: this.products
478+
products: salableProducts
474479
};
475480
}
476481
});

0 commit comments

Comments
 (0)