I have been trying to get searches for products to work in admin - it seems to only work for an exact match from the start of the product name. So for example, if I search for all my guitar strings products with 'Strings', it only picks up the entries where the first word of the product name is Strings. I really need a way to search so it picks up with a wild card format. upper and lower
Can anyone suggest a solution?
I'm using version the latest version 1.5.3.1
Thanks,
Kevin
Can anyone suggest a solution?
I'm using version the latest version 1.5.3.1
Thanks,
Kevin
Hmm, this simple is not true. It works on a partial match too. So say's this:
I just tested on my own admin. For a product named 'Cannodryer Sheet' is was finding it by typing in the string 'can'
Code: Select all
if (!empty($data['filter_name'])) {
$sql .= " AND LCASE(pd.name) LIKE '" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "%'";
}
Yes - that will work for me too if the product name starts with 'Can'. But can you find that product by entering 'Sheet'?
That is the problem I think.
I saw another post where someone said there was a wildcard ability previously, and was taken out in a recent version. I don't mind modifying the code if necessary. But I tried a little without success.
Thanks,
Kevin
That is the problem I think.
I saw another post where someone said there was a wildcard ability previously, and was taken out in a recent version. I don't mind modifying the code if necessary. But I tried a little without success.
Thanks,
Kevin
OK, I tried again to fix it and this time it worked 
At two places in the admin/model/catalog/product.php I added an extra # for wildcard before the variable, where there was already one after it. It fixed the problem.
So the change is from this:
To this:
One character added in each of two lines.
Cheers,
Kevin

At two places in the admin/model/catalog/product.php I added an extra # for wildcard before the variable, where there was already one after it. It fixed the problem.
So the change is from this:
Code: Select all
$sql .= " AND LCASE(pd.name) LIKE '" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "%'";
Code: Select all
$sql .= " AND LCASE(pd.name) LIKE '%" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "%'";
Cheers,
Kevin
Who is online
Users browsing this forum: No registered users and 7 guests