Метод | Описание | |
---|---|---|
__construct ( Magento\Framework\App\ResourceConnection $resource, Magento\Store\Model\StoreManagerInterface $storeManager, Magento\Framework\EntityManager\MetadataPool $metadataPool, Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry, Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration ) | InventoryData constructor. | |
loadInventoryData ( integer $storeId, array $productIds ) : array | Load inventory data for a list of product ids and a given store. |
Метод | Описание | |
---|---|---|
getStockId ( integer $websiteId ) : integer | Retrieve stock_id by store | |
getWebsiteId ( integer $storeId ) : integer | Retrieve Website Id by Store Id |
public __construct ( Magento\Framework\App\ResourceConnection $resource, Magento\Store\Model\StoreManagerInterface $storeManager, Magento\Framework\EntityManager\MetadataPool $metadataPool, Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry, Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration ) | ||
$resource | Magento\Framework\App\ResourceConnection | Database adapter. |
$storeManager | Magento\Store\Model\StoreManagerInterface | Store manager. |
$metadataPool | Magento\Framework\EntityManager\MetadataPool | Metadata Pool |
$stockRegistry | Magento\CatalogInventory\Api\StockRegistryInterface | Stock registry. |
$stockConfiguration | Magento\CatalogInventory\Api\StockConfigurationInterface | Stock configuration. |