From 670ed122562e86a0591d62426f23e2fbf8c1f08e Mon Sep 17 00:00:00 2001 From: Paul B Date: Tue, 13 Jun 2023 08:13:26 -0700 Subject: [PATCH 1/2] Update StockStatusExpressionForDefaultStock.php Indexed cataloginventory_stock_status.stock_status not updating if the inventory goes from out of stock to in stock. The original code used the same value in the cataloginventory_stock_status. --- .../ResourceModel/StockStatusExpressionForDefaultStock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InventoryCatalog/Model/ResourceModel/StockStatusExpressionForDefaultStock.php b/InventoryCatalog/Model/ResourceModel/StockStatusExpressionForDefaultStock.php index 1966ab83c21..66fcdf9c27a 100644 --- a/InventoryCatalog/Model/ResourceModel/StockStatusExpressionForDefaultStock.php +++ b/InventoryCatalog/Model/ResourceModel/StockStatusExpressionForDefaultStock.php @@ -46,7 +46,7 @@ public function getExpression(AdapterInterface $connection, bool $isAggregate): $isInStockExpression = $connection->getCheckSql( 'cisi.is_in_stock = 0', 0, - $connection->getCheckSql('css.stock_status IS NOT NULL', 'css.stock_status', $stockItemInStockField) + $connection->getCheckSql('css.stock_status IS NOT NULL', 'csi.is_in_stock', $stockItemInStockField) ); if ($isManageStock) { From a05ab54cba25520c7b74fb8ce8b6f41271bccbc4 Mon Sep 17 00:00:00 2001 From: Paul B Date: Mon, 10 Jul 2023 17:39:47 -0700 Subject: [PATCH 2/2] Update StockStatusExpressionForDefaultStock.php --- .../ResourceModel/StockStatusExpressionForDefaultStock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InventoryCatalog/Model/ResourceModel/StockStatusExpressionForDefaultStock.php b/InventoryCatalog/Model/ResourceModel/StockStatusExpressionForDefaultStock.php index 66fcdf9c27a..21ab7e3e74b 100644 --- a/InventoryCatalog/Model/ResourceModel/StockStatusExpressionForDefaultStock.php +++ b/InventoryCatalog/Model/ResourceModel/StockStatusExpressionForDefaultStock.php @@ -46,7 +46,7 @@ public function getExpression(AdapterInterface $connection, bool $isAggregate): $isInStockExpression = $connection->getCheckSql( 'cisi.is_in_stock = 0', 0, - $connection->getCheckSql('css.stock_status IS NOT NULL', 'csi.is_in_stock', $stockItemInStockField) + $connection->getCheckSql('css.stock_status IS NOT NULL', 'cisi.is_in_stock', $stockItemInStockField) ); if ($isManageStock) {