How to override default search in Magento?

I am working on a Magento site, and i would like to edit the default search result.

Editing search result is not editing the appearance of search result but the actual search results generated.

The idea is, if the Magento search does not return any value then i need to do a search in my custom table to fetch some relative products.

Could anyone help me to edit the default Magento search??

Thanks a lot in advance.

2 thoughts on “How to override default search in Magento?”

  1. You will need to modify some of the models in catalogsearch module, this link has a good explanation of how to override Core classes. In your case you will need to add your logic somewhere in the Query model or its resource or collection models.

Leave a Reply

Your email address will not be published. Required fields are marked *