Skip to content

Commit b58bc13

Browse files
do the stock check on default level because the stock on website level isn't updated and should be ignored
Product's are linked to categories without notice of any website. The visual merchandiser shows to lowest price of in stock and active simples that are associated with the configurable. The stock check ignores the website scope so if a simple is in stock on the website level but out of stock on default level it should been ignored to determine the lowest price. This commit fixes that issue.
1 parent 08ec8ce commit b58bc13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/code/Magento/CatalogInventory/Model/ResourceModel/Product/StockStatusBaseSelectProcessor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ public function process(Select $select)
5656
['stock' => $stockStatusTable],
5757
sprintf('stock.product_id = %s.entity_id', BaseSelectProcessorInterface::PRODUCT_TABLE_ALIAS),
5858
[]
59-
)->where('stock.stock_status = ?', Stock::STOCK_IN_STOCK);
59+
)
60+
->where('stock.stock_status = ?', Stock::STOCK_IN_STOCK)
61+
->where('stock.website_id = ?', 0);
6062
}
6163

6264
return $select;

0 commit comments

Comments
 (0)