6 declare(strict_types=1);
28 private $isProductSalable;
33 private $getProductSalableQty;
38 private $getSkusByProductIds;
43 private $storeManager;
48 private $stockResolver;
64 $this->isProductSalable = $isProductSalable;
65 $this->getProductSalableQty = $getProductSalableQty;
66 $this->getSkusByProductIds = $getSkusByProductIds;
68 $this->stockResolver = $stockResolver;
86 ? $this->storeManager->getWebsite()->getCode()
87 : $this->storeManager->getWebsite($scopeId)->getCode();
91 $status = (int)$this->isProductSalable->execute($sku, $stockId);
93 $qty = $this->getProductSalableQty->execute($sku, $stockId);
99 $stockStatus->
setQty($qty);
__construct(IsProductSalableInterface $isProductSalable, GetProductSalableQtyInterface $getProductSalableQty, GetSkusByProductIdsInterface $getSkusByProductIds, StoreManagerInterface $storeManager, StockResolverInterface $stockResolver)
setStockStatus($stockStatus)
if(!isset($_GET['website_code'])) $websiteCode
afterGetStockStatus(StockRegistryInterface $subject, StockStatusInterface $stockStatus, $productId, $scopeId=null)