[Not a bug] Admin orders product name search is missing wildcard
OK, maybe not a bug as such, but probably not the intent ?
Seen in 1.3.8 and still in 1.3.9d.
./admin/orders.php
line 716 (in 1.3.9d):
Quote:
$search = " and (op.products_model like '%" . $keywords . "%' or op.products_name like '" . $keywords . "%')";
does not allow a search match in all parts of product name as leading wildcard is missing on keyword. Can be solved by adding in % as:
Quote:
$search = " and (op.products_model like '%" . $keywords . "%' or op.products_name like '%" . $keywords . "%')";
Note: For 1.3.8, then you need to of applied bugfix http://www.zen-cart.com/forum/showpo...7&postcount=18 for the 'Search by Product Name' field to work.
:smile:
Re: Admin orders product name search is missing wildcard
That was by design not a bug so that Product Name searches had to begin with the search word ...
Many sites will find the first word more useful on a search of a Product than searching within a Product Name ...
If you need for your specific site this change would do as you have stated ...
As to making it part of the default setting in Zen Cart, at this time it would really need to be considered as previous checks on large database tables have found that to be more of a bother than a help ...
Thanks for the suggesting!