Latest News: (loading..)
Issue Information
-
#000472
-
0 - None Assigned
-
New
-
2.3.2
-
-
Issue Confirmations
-
Yes (0)No (0)
Products cannot be searched by Model in Admin Area.
Posted by panicgripdesigns on 30 July 2012 - 05:26 PM
In the categories.php the $products_query for search only compares the search query to the product's title. In my company's experience this makes finding products difficult.
Line 860
Replacement code:
Line 860
if (isset($HTTP_GET_VARS['search'])) {
$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name");
Replacement code:
if (isset($HTTP_GET_VARS['search'])) {
$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and ( pd.products_name like '%" . tep_db_input($search) . "%' or p.products_model like '%" . tep_db_input($search) . "%') order by pd.products_name");










