6 declare(strict_types=1);
25 private $resourceConnection;
30 private $getProductIdsBySkus;
35 private $defaultStockProvider;
48 $this->getProductIdsBySkus = $getProductIdsBySkus;
49 $this->defaultStockProvider = $defaultStockProvider;
59 $productId = $this->getProductIdsBySkus->execute([$sku])[$sku];
62 $legacyStockId = $this->defaultStockProvider->getId();
64 $connection = $this->resourceConnection->getConnection();
66 $this->resourceConnection->getTableName(
'cataloginventory_stock_item'),
67 $this->getBinds($stockItemConfiguration),
71 'website_id = ?' => 0,
const STOCK_STATUS_CHANGED_AUTO
execute(string $sku, int $stockId, StockItemConfigurationInterface $stockItemConfiguration)
const USE_CONFIG_ENABLE_QTY_INC
const USE_CONFIG_MANAGE_STOCK
isUseConfigNotifyStockQty()
const USE_CONFIG_BACKORDERS
getStockStatusChangedAuto()
__construct(ResourceConnection $resourceConnection, GetProductIdsBySkusInterface $getProductIdsBySkus, DefaultStockProviderInterface $defaultStockProvider)
const USE_CONFIG_NOTIFY_STOCK_QTY
const USE_CONFIG_MAX_SALE_QTY
isUseConfigEnableQtyInc()
const USE_CONFIG_QTY_INCREMENTS
const USE_CONFIG_MIN_SALE_QTY
const ENABLE_QTY_INCREMENTS
isUseConfigQtyIncrements()