I want to add a category for exist product. How can I do that from the code behide?
This is an example code:
public ProductDisplay AddProduct(ProductDisplay product)
{
var merchProduct = _productService.CreateProduct(product.Name, product.Sku, product.Price);
merchProduct.Category = "New Category" ///This line is to set a new category for product.
merchProduct = product.ToProduct(merchProduct);
_productService.Save(merchProduct);
return merchProduct.ToProductDisplay(DetachedValuesConversionType.Editor);
}
After add a new category the category should show in product box:
How to add a category for exist product?
Hello,
I want to add a category for exist product. How can I do that from the code behide?
This is an example code:
After add a new category the category should show in product box:
is working on a reply...