cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Disable search for the products on the Hybris front end having a specific attribute value

Former Member
0 Likes
693

Suppose I have a requirement whereby I don't want to search the products on the Hybris front end having a specific attribute value.even if the following products are present in the Hybris SOLR index.How to go about this?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

You can restrict products by creating "Listener" classes. Implement "FacetSearchListener" class and override "beforesearch" method and add a condition based on that attribute.

Former Member
0 Likes

,thanks a lot for your comment.Will this listener approach help in the way that if the product is there in the search index,even then not visible on the front end?

Former Member
0 Likes

Yes. THe products will be available in Index, you can restrict them during search and product listing pages.

Former Member
0 Likes

,should I make the following in a separate package and in the core or the facades extension?