IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
Product Types in the Ecommerce module are now shared across all the sites of your Multi site installation of Sitefinity CMS. This means that you can just define product types once and use it on any of your sites unlike 6.0 where Product Types have to be defined for each site. Product Types are separated from rest of the catalog and moved to their own shared provider, hence the breaking change in 6.1.
CatalogManager catalogManager = CatalogManager.GetManager();
//Get All Product types
var productTypes = catalogManager.GetProductTypes();
//Get single product type
var productType = catalogManager.GetProductType(Guid.NewGuid());
//pass the right id
//Create product type, below steps + any meta data persistence
var newProductType = catalogManager.CreateProductType();
//delete product type
catalogManager.DeleteProductType(productType);
EcommerceManager ecommerceManager = EcommerceManager.GetManager();
var productTypes = ecommerceManager.GetProductTypes();
var productType = ecommerceManager.GetProductType(Guid.NewGuid());
var newProductType = ecommerceManager.CreateProductType();
ecommerceManager.DeleteProductType(productType);
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important