Catalog filter customization: Customizing catalog entry properties
A catalog entry property is a searchable property of catalog entry that has been configured in HCL Commerce search. The conditions can be created in a catalog filter, the prebuilt properties are: part number, and manufacturer. With customization, you can add additional searchable catalog entry properties that can be used in a catalog filter.
Procedure
This example procedure outlines the high-level steps to create a
property.
-
Configure a searchable property, for example, property with key name
WarTerm
, warranty term. -
Open the file
LOBTools.war\WebContent\config\commerce\price\objectDefinitions\CatalogFilterCatentPropertyChildObjectDefinition.def
Add a code snippet similar to the following example to the child object definition,
cftPropertyAttributeObjectDefinition
.<ObjectTemplate 1displayName="${extCatalogFilterResources.warrantyTerm}" 2templateType="WarrantyTerm"> <Xml name="template"> 3<name>WarTerm</name> 4<attrType>Integer</attrType> </Xml> </ObjectTemplate>
Where:
- 1displayName
- The display name of this property. This value is shown on the user interface.
- 2templateType
- The unique template type identifier.
- 3name
- The propertyName Value passed in the BOD message. Use the same name that is configured in search engine.
- 4attrType
- This data type of this property: String, Float, Integer.
-
Open the file
LOBTools.war\WebContent\jsp\commerce\catalogfilter\SerializePropertyType.jspf.
Add the code shown in bold to the
<c:choose>
element.<c:choose> … … <c:when test="${propertyName == 'WarTerm'}"> <attrType>Integer</attrType> </c:when> </c:choose>