Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Alterning the search feature


Guest

Recommended Posts

Posted

I have installed a mod which adds extra fields to the database such as ISBN # or UPC code. What is the name of the file I need to alter so that a quick search can be conducted on those extra fields?

 

I want this stuff to display in a GENERAL search not advanced. I am just not sure of what file i need to alter. Any help would be great. Thanks in advance.

 

Matt

Posted

The General AND Advanced Search are run by the same file advanced_search.php. So you need to modify that one. Its a pretty lengthy and messy file and you have to edit in at a couple places to add the extra fields.

 

So just take your time with it so you don't break the code on accident.

I ♥ PHP/MYSQL/CSS

Posted
The General AND Advanced Search are run by the same file advanced_search.php.? So you need to modify that one.? Its a pretty lengthy and messy file and you have to edit in at a couple places to add the extra fields.

 

So just take your time with it so you don't break the code on accident.

 

 

You sure thats the correct file? I have added an additional field in the database very similiar to "weight" except it displays "ISBN". How can i add ISBN as a keyword?

 

I am not looking to add an extra field on the advance search. I want the customer to be able to search it in the general search.

Posted
You sure thats the correct file? I have added an additional field in the database very similiar to "weight" except it displays "ISBN".  How can i add ISBN as a keyword?

 

I  am not looking to add an extra field on the advance search.  I want the customer to be able to search it in the general search.

 

 

yes, advanced_search_result.php

Treasurer MFC

Posted

The file that you need to modify is /catalog/advanced_search_result.php.

Essentially, a giant select query is built with if/else and switch statements.

 

I modified my query so I cannot give you line numbers

 

Look for

$keyword = tep_db_prepare_input($search_keywords[$i]);

You will find "where" clauses under it. That is precisely where I made my changes to query additional fields.

 

It requires a bit of php/sql knowledge, but if you need further assistance feel free to post to this thread.

 

HTH,

Robert

Posted
The file that you need to modify is /catalog/advanced_search_result.php.

Essentially, a giant select query is built with if/else and switch statements.

 

I modified my query so I cannot give you line numbers

 

Look for

$keyword = tep_db_prepare_input($search_keywords[$i]);

You will find "where" clauses under it.  That is precisely where I made my changes to query additional fields.

 

It requires a bit of php/sql knowledge, but if you need further assistance feel free to post to this thread.

 

HTH,

Robert

 

 

I got it working. That was simple!!! YAY...you made my night

Archived

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

×
×
  • Create New...