Is there a way to select the stock of multiple products in one call?
We have the TC.GetStock(...) function which works perfectly for one product. However we have a case where we need to select the stock of a large amount of items. Calling TC.GetStock(..) per item will not show the products in time. Caching is no option, because the overview is about real life stock levels.
It would be ideal to have a method: TC.GetStock(IEnumerable<decimal> IDs) or something. Maybe it's possible to share the code of the TC.GetStock method so we can create an extended version of it?
Find the sku from the node id and then behind the sceen it does a DB lookup with the sku. So you can properly just make a SQL method to fetch multiple stock.
GetStock for multiple products
Is there a way to select the stock of multiple products in one call?
We have the TC.GetStock(...) function which works perfectly for one product. However we have a case where we need to select the stock of a large amount of items. Calling TC.GetStock(..) per item will not show the products in time. Caching is no option, because the overview is about real life stock levels.
It would be ideal to have a method: TC.GetStock(IEnumerable<decimal> IDs) or something. Maybe it's possible to share the code of the TC.GetStock method so we can create an extended version of it?
That would be a good idea!
The GetStock method does this internally:
Find the sku from the node id and then behind the sceen it does a DB lookup with the sku. So you can properly just make a SQL method to fetch multiple stock.
Kind regards
Anders
Good idea, will try this later on today for this shop. Maybe something to add to a future version?
Yeah it is added to the list of requests :)
is working on a reply...