6 declare(strict_types=1);
33 private $stockRegistry;
43 $this->scopeConfig = $scopeConfig;
58 $onlyXLeftQty = $this->getOnlyXLeftQty(
$product);
72 $thresholdQty = (float)$this->scopeConfig->getValue(
76 if ($thresholdQty === 0) {
82 $stockCurrentQty = $this->stockRegistry->getStockStatus(
87 $stockLeft = $stockCurrentQty -
$stockItem->getMinQty();
89 $thresholdQty = (float)$this->scopeConfig->getValue(
94 if ($stockCurrentQty > 0 && $stockLeft <= $thresholdQty) {
95 return (
float)$stockLeft;
resolve(Field $field, $context, ResolveInfo $info, array $value=null, array $args=null)
const XML_PATH_STOCK_THRESHOLD_QTY
__construct(ScopeConfigInterface $scopeConfig, StockRegistryInterface $stockRegistry)
foreach( $_productCollection as $_product)() ?>" class $info