Skip to content

Commit fe31dbf

Browse files
author
Anna Bukatar
committed
ACP2E-443 Configurable product remains out of stock even after full reindex if it's in stock and is_salable is set to 0
- Fixed CR
1 parent 0ab5a28 commit fe31dbf

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/code/Magento/Catalog/Model/ResourceModel/GetProductTypeById.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
declare (strict_types=1);
78
namespace Magento\Catalog\Model\ResourceModel;
89

910
use Magento\Catalog\Api\Data\ProductInterface;
1011
use Magento\Framework\App\ResourceConnection;
1112

1213
/**
1314
* Get product type ID by product ID.
14-
*
1515
*/
1616
class GetProductTypeById
1717
{
@@ -35,7 +35,7 @@ public function __construct(
3535
* @param int $productId
3636
* @return string
3737
*/
38-
public function execute(int $productId)
38+
public function execute(int $productId): string
3939
{
4040
$connection = $this->resource->getConnection();
4141
$productTable = $this->resource->getTableName('catalog_product_entity');

app/code/Magento/ConfigurableProduct/Model/Plugin/UpdateStockChangedAuto.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
declare (strict_types=1);
78
namespace Magento\ConfigurableProduct\Model\Plugin;
89

910
use Magento\Catalog\Model\ResourceModel\GetProductTypeById;
1011
use Magento\CatalogInventory\Model\ResourceModel\Stock\Item as ItemResourceModel;
1112
use Magento\Framework\Model\AbstractModel as StockItem;
1213
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
1314

15+
/**
16+
* Updates stock_status_changed_auto setting for configurable product when it was saved manually
17+
*/
1418
class UpdateStockChangedAuto
1519
{
1620
/**

0 commit comments

Comments
 (0)