Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
This section covers the specific features of the Catalogs system, describing how you can organize and leverage it to extend functionality for browsing, searching, and displaying items in a product catalog, features that are essential for e-commerce websites.
How you set up the structure of the catalog with products and variants/SKUs depends on how you intend to work with the data. You can use a product grouping under the categories, or you can work directly with SKUs. If you are only going to have one SKU per product, then there does not need to be a product.
The system also supports multi-level product inheritance, meaning that you can attach products as variants to a product, and the child product can have further child variants. In the example image below from the fashion industry, a "product" in Commerce is a "style" for instance a "sweatshirt". A specific color of that shirt is a "variant" linked to the product, and the combination of a specific size and color is a "SKU". Enrichment is primarily done on style level, but images and color are added on variant level. The SKU is the sellable unit with a set price. Typically, some of the information may be retrieved from an external ERP or PIM system integrated with EPiServer Commerce.
If you have multiple SKUs per product, then you will also need to create a page template for this. You can have as many page templates as you want, typically you will have one for SKUs, one for each type of product, one for bundles etc. Since you have multiple templates, you can mix products and SKUs in listings.
Classes for working with catalogs are available in the Mediachase.Commerce.Catalog namespace.
Example: looking for changed data in the DTO and saving new, changed, or deleted data
ICatalogSystem target = CatalogContext.Current;
CatalogDto catalogs = target.GetCatalogDto();
foreach (CatalogDto.CatalogRow catalog in catalogs.Catalog)
{
existingCatalogId = catalog.CatalogId;
break;
}
CatalogEntryDto dto = target.GetCatalogEntriesDto(existingCatalogId, response);
// Catalog entry create and set properties
CatalogEntryDto.CatalogEntryRow catalogEntryRow = dto.CatalogEntry.NewCatalogEntryRow();
catalogEntryRow.ApplicationId = CatalogConfiguration.Instance.ApplicationId;
dto.CatalogEntry.AddCatalogEntryRow(catalogEntryRow);
target.SaveCatalogEntry(dto);
You can also create objects from DTO objects. For example, there is a constructor for CatalogNode that allows you to pass a CatalogNodeRow in):
1 public CatalogNode(CatalogNodeDto.CatalogNodeRow input)
Catalog pricing, tiered pricing and custom sale types offer flexible ways to define multiple prices for products. Refer to Pricing for more information.
Last updated: Oct 21, 2014