Loading...
Area: Episerver Commerce
Applies to versions: 10 and higher
Other versions:

Overriding default conventions

This topic describes indexing conventions for catalog content and how to make changes to the default behavior, in Commerce solutions where the Episerver Find-Commerce integration (EPiServer.Find.Commerce) is used.

Catalog content client conventions

To change default behavior, create a new class to override the conventions that are applied. The following example shows what class to inherit from, and how to register your implementation.

Remove inventories from being indexed

Inventories get indexed for variants by default. The inventories are part of the variant document, and contain information about the inventory in different warehouses.

When the inventory event is triggered, the variant content is re-indexed. By removing the inventories from the variant, the content is not re-indexed on inventory updates.

Remove prices from being indexed

Prices are indexed for variants by default, are part of the variantdocument, and contain information about the prices for different users and groups.

When a price event is triggered, the variant content is re-indexed. By removing the prices, and default price from the variant, the content is not re-indexed on price updates.

ApplyConventions

This method applies the default conventions. If you want to make a change, override this method, or any of the submethods, and add or remove conventions you need.

Apply pricing conventions

This method allows for IPricing to be indexed, meaning that the default price and all other prices are indexed with the associated content. You can override this method if you want to change which fields are indexed.

Apply price conventions

This method allows excludes the EntryContent field from the Price object when indexing. Leave this field excluded if you are indexing prices. If you are not indexing prices, you can remove this convention.

Apply stock placement conventions

This method allows for IStockPlacement to be indexed, meaning that inventory records are indexed with the associated content. You can override this method if you want to change which fields are indexed.

Apply customer pricing conventions

This method allows for CustomerPricing objects to be properly indexed. If you are indexing prices, leave this convention as-is. If you are not indexing prices, remove this convention.

Last updated: Feb 20, 2017