var productFactory = new ProductFactory(baseUrl, account, password);
var product = new product
{
name = new List()
{
new language(1, "My Product")
},
associations = new AssociationsProduct()
{
categories = new List { new category(7) },
combinations = new List { new combinations() { id = 1} }
},
active = 1,
available_now = new List { new language(1, "In stock")},
description = new List { new language(1, "My product")},
description_short = new List { new language(1, "My product")},
id_category_default = 2,
price = 10,
wholesale_price = 9
};
product = productFactory.Add(product);
var imageFactory = new ImageFactory(baseUrl, account, password);
imageFactory.AddProductImage((long)product.id, @"C:\sample.jpg");
I go to check table ps_product and ps_product_attribute records are added. And, I also can view product at home page. I'm using Prestashop 1.7.
var productFactory = new ProductFactory(baseUrl, account, password); var product = new product { name = new List()
{
new language(1, "My Product")
},
associations = new AssociationsProduct()
{
categories = new List { new category(7) },
combinations = new List { new combinations() { id = 1} }
},
active = 1,
available_now = new List { new language(1, "In stock")},
description = new List { new language(1, "My product")},
description_short = new List { new language(1, "My product")},
id_category_default = 2,
price = 10,
wholesale_price = 9
var imageFactory = new ImageFactory(baseUrl, account, password); imageFactory.AddProductImage((long)product.id, @"C:\sample.jpg");
I go to check table ps_product and ps_product_attribute records are added. And, I also can view product at home page. I'm using Prestashop 1.7.