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?

1 Answer 1


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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