How to override search in Magento?

My user should be able to use the search box to search by some attribute (numeric) it works.

But I’d like to my customer to be able to search using separator.

Example:

search by : 12345678 = works great

search by : 12-34-56-78 = doesn’t work

Which will the best way to override magento search to parse/rewrite/modify this behavior?

Thank you

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

  1. If you actually want to override the default search (OOP override, that is) Refer to my earlier answer.

    Otherwise @Anton’s answer may be enough for you to use the default search which is always preferable.

  2. Admin -> Catalog -> Search Terms -> Add New Search term.

    Define variants of the searches you want to be redirected else where or found.

Leave a Reply

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