I want to substring the query terms in my magento searches.

Example: the user type "dogs" in the magento search input and the results actually search for "dog".

Is there a way to change that?

Where should I put something really simple as:

$text = substr ( $text , ..., ...);

Which core code should I look for?

In addition, I prefer that the user will be able to see the whole text typed in the input field while displaying search results page...

1 Answer 1


Actually the search term is returned from the following function getEscapedQueryText() in app\code\core\Mage\CatalogSearch\Helper\Data.php

Override that helper. Thats all.


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.