cancel
Showing results for 
Search instead for 
Did you mean: 

Product search filter based on the category or product custom attribute

Former Member
0 Kudos

I would like to filter the product search results based on a particular product custom attribute value or catalog category it belongs to. Has there any standard way of doing it in webchannel? Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI

Make an entry in catalog-site-config.xml in tc-web-core project.

<QuickSearchAttributes>

<Attribute ID="OBJECT_DESCRIPTION" type="String"/> >

<Attribute ID="TEXT_0001" type="String"/>

<Attribute ID="OBJECT_ID" type="String"/>

<Attribute ID="TEXT_0003" type="String"/>

<Attribute ID="CUSTOM ATTRIBUTE" type="String"/>

</QuickSearchAttributes>

also configure the same attribute in Product Catalog and replicate the same to TREX.

If you want to get the same in the resultset use the below code.

product.getCatalogItem().getAttribute("CUSTOM ATTRIBUTE") in the jsp.

Hope this helps you.

Regards

Antony