Add References to Advanced Search | Last Update: 17th August, 2005 Article ID: 251 |
Introduction
A reference to what a user searched for on the results page allows a nice listing with the search name at the top of the page.
Solution
First, in catalog/advanced_search_result.php (about line 137), find the line
<td class="pageHeading"><?php echo HEADING_TITLE_2; ?></td>
Change To:
<td class="main"><?php echo sprintf(HEADING_TITLE_2, $HTTP_GET_VARS['keywords']); ?></td>
Then in catalog/includes/languages/english/advanced_search.php (about line 17), find the line:
define('HEADING_TITLE_2', 'Products meeting the search criteria');
Change To:
define('HEADING_TITLE_2', '<font size="2">Your search for
</font><br><font size="4"><b>%s</b></font><br><font size="2">returned the following results:</font>');
This results in the new text replacing the page heading that is seen in the stock installation ("Products meeting the search criteria") with text that is the same class as your main text, but a bit larger, with the search terms on a separate line and bolded - similar to this:
Your search for
microsoft OR keyboard
returned the following results:
You could create a new class in your stylesheet and apply to the catalog/advanced_search_results.php page code above instead of the pageHeading class. It is according to your preferences.