cancel
Showing results for 
Search instead for 
Did you mean: 

Bring selected category/brand in top 3 auto suggestion

Former Member
0 Kudos

Hi All,

In our project there is is a requirement that, if some text is typed in the text box, then accordingly top 3 categories/brands will appear in the auto suggestion section, and these top 3 category/brands should be configurable. The requirement is as :

Customer types 'shoes' in the text box, then in the auto suggestion section, it will offer top 3 configured category/brand first and then the relevant products:

e.g: NIKE SHOES(category1) PUMA SHOES(category2) ADIDAS SHOES(category3) Product1 Product2 Product3

and where and how we can configure these 3 category/brand which we want to show on top, so that if in future we can to promote different brands then we can easily manage them.

can some one tell me that how I can achieve this. Please reply on this query.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Gyanendra,

If I am correctly understand you requirement, you can make an item(Top3Item) type which can have name and url and code as well. So make it as configurable from hmc or backoffice so you will need some hmc customization.

Once your auto suggestion call is coming into controller just make a call to db to fetch that Top3Item and extract all three or four model and convert it into compatible data object and set it in place of auto suggestion process. So when ever you required you can change value of Top3Item and can display on frontend.

Hope it will help you, please accept as answer.

Former Member
0 Kudos

Thanks Abhishek

Answers (1)

Answers (1)

mpern
Employee
Employee
0 Kudos

How about:

  • make top categories configurable per BaseStore (add list of categories via items.xml)

  • Add custom logic to autocomplete suggestions (e.g. ProductSearchFacade#getAutocompleteSuggestions) to fetch top categories first

Former Member
0 Kudos

Thanks Markus.