I'm trying to add a product:
product = Product.Create(""); product.addGroup(new Group("hej")); product.ID = "A333"; product.Number = "A333"; product.Name = "test"; product.DefaultShopID = Shop.getShops(true).get_Item(0).ID; product.LanguageID = Dynamicweb.eCommerce.Common.Context.LanguageID; product.Save();
[NullReferenceException: Object reference not set to an instance of an object.]
Dynamicweb.eCommerce.Common.Context.set_LanguageID(String Value) +60
Dynamicweb.eCommerce.Common.Context.get_Language() +71
Dynamicweb.eCommerce.Common.Context.get_LanguageID() +78
Dynamicweb.eCommerce.Products.Product..ctor(String ProductID, String VariantId, String languageId) +493
Dynamicweb.eCommerce.Products.Product.Create(String ProductID, String VariantId, String languageId) +238
Dynamicweb.eCommerce.Products.Product.Create(String ProductID, String VariantId) +11
Dynamicweb.eCommerce.Products.Product.Create(String ProductID) +11
DwModule.Commands.ImportProducts() +146
DwModule.Commands.ProcessRequest(HttpContext context) +141
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Looks like there's some problem with the language settings...
Best regards,
Per