Guest Posted January 18, 2005 Posted January 18, 2005 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
AXM Posted January 18, 2005 Posted January 18, 2005 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
Guest Posted January 19, 2005 Posted January 19, 2005 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. <{POST_SNAPBACK}> 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.
boxtel Posted January 19, 2005 Posted January 19, 2005 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. <{POST_SNAPBACK}> yes, advanced_search_result.php Treasurer MFC
Rob123 Posted January 19, 2005 Posted January 19, 2005 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
Guest Posted January 19, 2005 Posted January 19, 2005 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 <{POST_SNAPBACK}> I got it working. That was simple!!! YAY...you made my night
Recommended Posts
Archived
This topic is now archived and is closed to further replies.