StockStatusCalculatorArgs InventorySystemIds Return only one inventory stock

When I pass the “InventorySystemIds” in StockStatusCalculatorArgs

and call the method _stockStatusCalculator.GetStockStatuses
This method returns only the stock from last inventory.

When I try to loop through each inventory and pass in each Id separately I get the stock for that inventory.

Is this supposed to function this way or am I using it wrong.

My intention is to show stocks from multiple inventories on product page.

Is it a bug ? I saw that same issue was reported previously as bug 46845 and 46799.

Another issue reported in forum:
StockStatusCalculatorArgs InventorySystemIds - Questions - Litium Forum

Litium version: [7.5.1.0]

The stock status calculator will tell you the quantity and stock id of the inventory with the highest quantity of available items. It will use the inventories connected to the current country plus any additional inventories you pass to it. So it basically answers the question, is this variant in stock?

You can use the InventoryItemService to fetch the quantity for a specific variant and inventory.

Hi @NilsN

yes, its variant in stock, and this answers my question.

Just curious about stockStatusCalculator.GetStockStatuses
is there any documentation about this method, where I can get more info.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.