Community Add-Ons

Maintainers: akunamachata
Add file to this package
Top » Features

Search products id
for osCommerce Online Merchant v2.2

catalog/advanced_search_result.php

search:
$keyword = tep_db_prepare_input($search_keywords[$i]);
$where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%'or p.products_model like '%" . tep_db_input($keyword) . "%'";


replace:
$where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%' or p.products_id like '%" . tep_db_input($keyword) . "%'";


i feel like expanding the search incase if customer wants to quick search by product id.

Legend:  Download   Report
Expand All / Collapse All
Search products id akunamachata 27 Mar 2009  

catalog/advanced_search_result.php

search:
$keyword = tep_db_prepare_input($search_keywords[$i]);
$where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%'or p.products_model like '%" . tep_db_input($keyword) . "%'";


replace:
$where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%' or p.products_id like '%" . tep_db_input($keyword) . "%'";


i feel like expanding the search incase if customer wants to quick search by product id.