Hi!
Is there any general fields that need to be set when creating products, groups or orders?
I'm using this to create a product with an associated group. The product is created and I can se that the product belongs to this group, but the group isn't showed in the menu in the Product catalog tree:
My code:
Product p = new Product("");
p.ID = id;
p.Name = name;
p.Active = true;
p.Number = id;
p.DefaultShopID = Shop.getShops("SHOP1").get_Item(0).ID; //set shop ID
p.Language = Dynamicweb.eCommerce.Common.Application.DefaultLanguage; //set language ID
Group group1 = new Group("");
group1.Name = "My group1";
group1.ShopID = Shop.getShops("SHOP1").get_Item(0).ID;
group1.LanguageID = Dynamicweb.eCommerce.Common.Application.DefaultLanguage.LanguageID;
group1.Save("group67");
p.Groups.Add(group1);
p.Save();
One problem with the DW api I think, is that when certain fields are mandatory for a successful creation, there is no exception telling what's missing when these fields a left out.
And the last thing I wonder is if there's some fields that applies to both products, groups and orders when you want to accomplish a successful creation of these types?
Best regards,
Per
Best regards,
Per