Hi,
Although this is reproduced in Swift, we believe the GetProductLink extension method needs to check for a null product and/or PrimaryOrDefaultGroup.
Repro steps
- Place an order
- Delete at least one product that has been purchased
- Go to the Order Details
https://app.screencast.com/5rsDsXeJgauGy
The offending line in OrderDetails is this
Apparently GetProduct() orderline method extension does return a ProductViewModel (https://dev.azure.com/dynamicwebsoftware/Dynamicweb/_git/Dynamicweb?path=/src/77%20-%20Ecommerce/Dynamicweb.Ecommerce/Frontend/OrderLineViewModelExtensions.cs&_a=contents&version=GBmain), because the orderline does have a ProductId (and eventually a VariantId), but then the GetProductLink() method extension does not check whether the product exists, resulting in the error (line 65 - https://dev.azure.com/dynamicwebsoftware/Dynamicweb/_git/Dynamicweb?path=/src/77%20-%20Ecommerce/Dynamicweb.Ecommerce/ProductCatalog/ProductViewModelExtensions.cs&_a=contents&version=GBmain)
This also happens in our batch import of orders, when a product does not exist in the EcomProducts table.
Best Regards,
Nuno Aguiar