Override Catalog Data Type

Current version: 8.2

You can override the data type on a Catalog or Inventory property.

The ICatalogTypeOverride has a single method: public CatalogDataType GetTypeOverride(string propertyName, CatalogDataType originalType). This method expects you to pass in a name of a catalog or inventory property name and its original type. Within this method you can decide if a particular property should be returned as something else.

You can override this type by patching the ICatalogTypeOverride type in the Commerce Server types section.

The ICatalogTypeOverride type is currently used inside the CatalogTemplateGenerator class inside the AddTemplateField method, in addition to inside the CatalogFieldValidator class for use when validating catalog values.

Do you have some feedback for us?

If you have suggestions for improving this article,