Something went wrong.
Salable Quantity is the sum of available resources, grouped in stocks. Salable quantity gets changed when the order is placed or the physical quantity in the warehouse changes.
If you have any doubts regarding this post, just mention them in the Comments section below.
Now, the merchants can link multiple inventory sources to one or multiple websites and manage their inventory in more than one location to accurately reflect their physical inventories without any 3rd party extensions!
I would be happy to help.
If you have downloaded the Magento 2.3.3 version, you might have seen the salable quantity and quantity in the product grid.
For instance, the admin may want to hide the SKU and stock status if the salable quantity is zero and if it is greater than zero, show the SKU and stock status in Magento 2 store.
While working on inventory management, a need may arrive to apply validation or conditions based on salable quantity.
Method to Get Product Salable Quantity in Magento 2
public function __construct(
$this->getSalableQuantityDataBySku = $getSalableQuantityDataBySku;
public function execute(MagentoFrameworkEventObserver $observer)
$sku = “simple_blue”;
$salable = $this->getSalableQuantityDataBySku->execute($sku);
Get salable quantity using ObjectManager
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$StockState = $objectManager->get(‘MagentoInventorySalesAdminUiModelGetSalableQuantityDataBySku’);
$qty = $StockState->execute($_product->getSku());
Use the below method and get the salable quantity programmatically in Magento 2.
Never miss Magento tips, tricks, tutorials, and news.
Thank you for subscribing.
In the above scenario, we have to pass the condition on a salable quantity. To do so, we need to get product salable quantity in Magento 2.
The release of Magento 2.3.3 introduced the concept of salable quantity.
Get Weekly Updates
Feel free to share the solution with Magento Community via social media.
The product grid displays the salable quantity in Magento 2 store: