Magento Quick Search Find Exact Phrase Or Word

When ever we search word or a phrase in magento it returns all the product contaning that word or phrase or some time it returns all product

example if we search earrings it returns us earrings as well as it return rings also so to fix this we follow the fix given below, hope it could help you also

You need to modify line 345 (Magento ver. 1.5.1.0) of the
[php]
app/code/core/Mage/CatalogSearch/Model/Mysql4/Fulltext.php

if ($like) {
$likeCond = ’(‘ . join(‘ OR ’, $like) . ’)’;
}
[/php]
and change “OR” with “AND”

Leave a Comment

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

*