Under the Magento admin menu Customers -> Manage Customers, we’re unable to search for a customer using his name if the string consists of more than one word. Where would I find the core codes that performs this task? We don’t have an extension for this section.
Example of the problem:
If I want to search for a customer named John Smith, searching for “john smith” returns no results. Searching for “john” or “smith” separately works, but it will bring up any names that contain “john” or “smith” similar to the SQL queries, LIKE %john% or LIKE %smith%.
Looks like you’re using Magento version 1.6
It is a bug and has been fixed in 1.7
Here’s the code that need to be modified: app/code/core/Mage/Customer/Model/Resource/Customer/Collection.php
I post the code taken from version 1.7: