Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Advanced search on index.php


piwa

Recommended Posts

Posted

Hello!

 

On the left in index.php is a Search Box, if I enter a Keyword and press the search button a standard search will performed. I would change this that a advanced search (includes search in the product description) starts.

 

I hope anyone can helps me!

Thx

Posted

If something is not clear let me know.

I hope anyone can help me with this problem.

 

Thank you!!

Posted

If need anyone...

 

I changed temporary this in advanced_search_result.php to make allways a advanced search (with search in description)

 

$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 if command would commented)

 

 

But the Flag "search in description" at the search page has with this code no effect

Posted

:huh: Heres the link I thought I may as well help you a little bit more as I installed this a few days ago any way:

 

CONTRIBUTION

 

You can see the script in action in the search box on this website:

 

EXAMPLE

Posted

Thank you! :D

 

This Search Box is another way to make search on my Webshop easy!

Archived

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

×
×
  • Create New...