PDA

View Full Version : Searching in admin for Products Model



modMan7
02-19-2005, 11:26 AM
Is there a way to search from the admin section in max and find the products number of a product or search a description item? I often have to lookup a product with the Products Model number (stock number), but since it is not in the Description, there is no way to find it in Admin?

Any mod suggestions?

D

michael_s
02-19-2005, 01:08 PM
try:
http://www.oscommerce.com/community/contributions,1648/category,all/search,admin+search+product

modMan7
02-19-2005, 06:30 PM
THANK YOU! One quick follow up. I noticed that the code that I had to enter would not search the descriptions as well, any suggestions what to add to this so that the admin search will search descriptions also?

Below is contribution code added.

Also, is there a way to use this search field to search for customer's telephone number, street address or last name, first name? We have 800 smiths....

Thanks.

$products_query = tep_db_query("select p.products_id,
p.products_model,
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");