I have a question here, And I am not sure what can cause the problem...
I am trying to add a product to a shopping cart, eventually I am receiving this (null pointer exception)
ErrorAssigningOrderLine System.NullReferenceException: Object reference not set to an instance of an object. at Dynamicweb.eCommerce.Orders.Order.CreateOrderLine(Product product, Double quantity, StockUnit unit) at Dynamicweb.eCommerce.Orders.Order.CreateOrderLine(Product product) at SkabelonModule.loadTheCart(String userName, String templateName) in C:\Projects\dw8CM1\CustomModules\SkabelonModule\SkabelonModule.cs:line 1127
I am trying to see if I am getting the exception while retrieving the product itself with:
Product myproduct = Product.GetProductByID(prod.getProdID());
So I am really surprised why there is a problem to assign a product to cart order line.
Eventually in the frontend, I can see it re-initiated the cart, as it should, but the cart is simply empty.
Here is the implementation of the method:
(see the attachment)
Any suggestions?
Kind regards,
Dmitrij