Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Changing the search option to use word + word + word
 
RPGShop
Sr. Member
 
Total Posts:  143
Joined:  2008-06-16
 

I wanted to change the quick search query to use like and replace all spaces with %… in other words I’d like a search text of “two fist” to find the book called “two-fisted tales”.

To do this I changed:

app/code/core/Mage/CatalogSearch/Model/Mysql4/Search/Collection.php

I added

$query = eregi_replace(” “,"%", $query);

right above this:

$this->_searchQuery = ‘%’.$query.’%’;

In the function:

function addSearchFilter($query)

James
http://www.RPGShop.com

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top