Skip to main content
9 votes
Accepted

How to get salable qty in magento 2.3.3?

<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $StockState = $objectManager->get('\Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku'); $qty = $...
Haerriz's user avatar
  • 681
4 votes
Accepted

Salable quantity of 0 but still showing in stock?

I was facing the same issue in one of my projects recently. In my case the client wanted to display stock availability label (i.e. Instock/Outofstock) on category pages as well. That is not available ...
Pratik Navapara's user avatar
4 votes
Accepted

How to update product salable quantity in Magento 2.4 programmatically?

To set the saleable quantity of a product , you need to look at this table = "cataloginventory_stock_item" , in this the field = "qty". So in order to set the qty in this table , ...
Bharath Kumar's user avatar
2 votes

How to get salable qty in magento 2.3.3?

Try the below code to get salable QTY. <?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $StockState = $objectManager->get('\Magento\InventorySalesApi\Api\...
MK Patel's user avatar
  • 422
2 votes
Accepted

Magento 2.3 | How to switch off the new inventory system | Issue with products going out of stock

If your ERP stock update happens often enough, and your website isn't creating large amounts of sales in the gap between updates, you can just disable the reservation step EITHER by making the ...
iphigenie's user avatar
  • 1,769
2 votes
Accepted

Magento2.3- Inventory Management unable to decrease Salable Quantity

I can't explain you here how saleable quantity logic was worked in M2, but read below link it the best example of how saleable quantity mechanism works. Magento2 - Salable Quantity Calculation and ...
Rik Patel's user avatar
  • 485
1 vote
Accepted

Salable quantity won't update from 0 in Magento 2.4.4

I got it. I had to update the stockItem after saving the sourceItem. Below is full working code. use Magento\InventoryApi\Api\SourceItemsSaveInterface; use Magento\InventoryApi\Api\Data\...
Swappart's user avatar
1 vote

How to update product salable quantity in Magento 2.4 programmatically?

Magento latest version uses the MSI inventory module for managing the inventory. Also providing provisions to create multiple inventory sources. By default, It will use the default source. If you want ...
Jitendra Patel's user avatar
1 vote
Accepted

Magento 2 - How to find all products with Salable qty as 0 via SQL query?

Try below query which will return the enabled products having 0 salable quantity. SELECT t1.`sku`, (SUM(t1.`quantity`) + COALESCE(SUM(t2.`quantity`), 0)) AS `salable_quantity` FROM `...
Rahul Barot's user avatar
  • 1,122
1 vote
Accepted

Magento 2.4 product stock status not change after salable quantity become zero

In My Project, I am using external Stock so Order Invoices & shipments not happening at Magento's end, so I need to change the inventory based on order placement. The following module works as you ...
Jitendra Patel's user avatar
1 vote

Magento2: issue with quantity - inventory

This is expected behaviour. Initially both quantity and salable quantity is same for any product. When you will receive any order the salable quantity decreases but quantity remains unchanged. When ...
amitshree's user avatar
  • 7,076
1 vote

Salable quantity in magento 2.3.3

A fast-forward answer - you have to create shipments for the orders which were placed for that product. The product's actual stock quantity is decreased only when the orders containing that product ...
Diana's user avatar
  • 5,280
1 vote

How to get salable qty in magento 2.3.3?

Use the following code :- namespace Vendor\Module\ModelName; use Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku; class ClassName { private $getSalableQuantityDataBySku; ...
Ronak Rathod's user avatar
  • 6,450
1 vote

How to update salable quantity of product from admin or programmatic in magento 2.3?

This is verified in Magento 2.3.2 public function __construct( \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry ) { $this->stockRegistry = $stockRegistry; parent::...
Supravat Mondal's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible