6 declare(strict_types=1);
27 private $isProductSalable;
32 private $getProductSalableQty;
37 private $storeManager;
42 private $stockResolver;
56 $this->isProductSalable = $isProductSalable;
57 $this->getProductSalableQty = $getProductSalableQty;
59 $this->stockResolver = $stockResolver;
77 ? $this->storeManager->getWebsite()->getCode()
78 : $this->storeManager->getWebsite($scopeId)->getCode();
81 $status = (int)$this->isProductSalable->execute($productSku, $stockId);
83 $qty = $this->getProductSalableQty->execute($productSku, $stockId);
89 $stockStatus->
setQty($qty);
__construct(IsProductSalableInterface $isProductSalable, GetProductSalableQtyInterface $getProductSalableQty, StoreManagerInterface $storeManager, StockResolverInterface $stockResolver)
setStockStatus($stockStatus)
afterGetStockStatusBySku(StockRegistryInterface $subject, StockStatusInterface $stockStatus, $productSku, $scopeId=null)
if(!isset($_GET['website_code'])) $websiteCode