Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Brand new question about the search function


rdub

Recommended Posts

Posted

I have 5 test products on my site. I tried the search function using part of the name of a product and the result is "no matches". Is there something I need to set up for this to work?

Posted

you need to check the advanced_search_result.php as it should be the following lines in it:

 

line 258-263

default:
	  $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) . "%'";
	  if (isset($HTTP_GET_VARS['search_in_description']) && ($HTTP_GET_VARS['search_in_description'] == '1')) $where_str .= " or pd.products_description like '%" . tep_db_input($keyword) . "%'";
	  $where_str .= ')';
	  break;

 

the following code should search for the keyword inside of product name:

 

products_name like '%" . tep_db_input($keyword) . "%'

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...