Hi Dynamicweb,
I have an issue getting the correct stock quantity when using stock locations and a ProductViewModel. Model.StockLevel is not returning the correct stock quantity from the stock location defined on the website.
When using Dynamicweb.Rendering.RazorTemplateModel, then GetDouble("Ecom:Product.Stock") is returning the correct stock quantity.
I can see a difference in the code when comparing ViewEnginec.cs and Renderer.cs. In ViewEnginec.cs GetUnitStock(StockLocation stockLocation, string unitId) is called without af stock location, but in Renderer.cs the same method is called including a stock location coming from the context.
(Dynamicweb 9.15.6)
Best regards,
Niels Foldager