Catalog filter customization: Customizing matching rules
You can configure the matching rules for catalog filter conditions. Matching
rules connect the data types of the catalog entry properties, or attribute dictionary attributes
using String, Integer and Float data types. With customization you can additional matching rules.
Procedure
This example procedure outlines the high-level steps to create a matching rule,
contains
. The conditions are based on attributes and properties using the String
type, the matches are partial.-
Define the matching rule in the Management Center user interface:
- LOBTools\WebContent\config\commerce\price\objectDefinitions\CatalogFilterAttributeReferenceObjectDefinition.def
- LOBTools\WebContent\config\commerce\price\objectDefinitions\CatalogFilterCatentPropertyChildObjectDefinition.def
In these files, find the
<wcfPropertyDefinition propertyName="operator">
.Append the following code.
<wcfPropertyDefinition propertyName="operator" displayName="${cftCatalogFilterResources.catalogFilterAttributeOperator}" required="true"> …… // This matching rule only applied to String type property or attribute <PropertyValue displayName="${extCatalogFilterResources.catalogFilterOperatorStringContains}" value="STRING_CONTAINS"> <EnablementCondition conditionId="stringCondition" enablementValue="String" propertyName="attrType" /> </PropertyValue> </ wcfPropertyDefinition>
-
Customize the runtime code to support the new matching rule. The catalog filter runtime code
builds a search expression based a catalog filter the condition is composed in this expression.
Build a search engine specific expression snippet for the new matching rule.
In summary: