In magento, it is not possible to search for categories.

Currently it shows only the products in the list.

I need Categories and products in the search result.

Search results for categories should be related to searched query and not to the category of products that are listed in the result.

Otherwise how to show the categories name associated with search result products?

Help me find the file, In which file to we can edit the search query?

I'm not sure I understand your question correctly.

You want to show categories which match the search query, correct?

I would implement a new block, add it via layout.xml to the catalogsearch_result_index and/or catalogsearch_advanced_result.

The block only needs to get all the categories which match the query, here you need to define whether you want like or fulltext search, or something more complex.

Then you need a template, iterate over all the categories and output them.

Try Sphinx Search Ultimate. This extension support search by multiple conent types (products, categories, blogs, articles etc)


Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.