Hello,
I am writing some backend code for a DW solution that has products, but no cart. When I create a user and save it, somehow the Dynamicweb.Ecommerce.Cart.UserSavedSubscriber gets called and crashes with a null reference in Dynamicweb.Ecommerce.Common.Context.GetCart() with the stacktrace:
at Dynamicweb.Ecommerce.Common.Context.GetCart()
at Dynamicweb.Ecommerce.Cart.UserSavedSubscriber.OnNotify(String notification, NotificationArgs args)
at Dynamicweb.Extensibility.Notifications.NotificationManager.Notify(String notification, NotificationArgs eventArgs)
at Dynamicweb.Security.UserManagement.User.Save()
I have tried to override the UserSavedSubscriber OnNotify method, and while debugging see that it gets called, but even then the exception occurs afterwards. (which seems weird, the override should prevent excecution of normal code I would think)
Is this normal behavior when not implementing the cart and can I do something to solve this, or is this a bug?
Greets Hans