0

How can i call Product Qty instead Salable Qty in

            if($product->getTypeId() == 'simple') {
                $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                $StockState = $objectManager->create('Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku');
                $qty = $StockState->execute($product->getSku());
                $product->setData('salable_qty', $qty[0]['qty']);
            }

i have deactivate Salable Qty in the trying to decrease product qty when the order is placed and not when it is shipped

1 Answer 1

0

Try just

$product()->getQty(); 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.