Hello,
I am trying to highlight the search results from the search box.
I followed
this tip/trick, made a few fixes to the _GET issue, replacing it with HTTP_GET_VARS.
This is the product_listing.php change for PRODUCT_LIST_NAME:
Quote:
case 'PRODUCT_LIST_NAME':
$lc_align = '';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id'] . $parm_add) . '">' . highlight_viewable_text($listing[$x]['products_name'], $HTTP_GET_VARS['keywords'], 'searchTag') . '</a>';
} else {
$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a> ';
}
break;
|
This is the product_info.tpl.php part:
Quote:
if ($display_search_results) {
// highlight
$products_name = highlight_viewable_text($product_info['products_name'], $HTTP_GET_VARS['keywords'], 'searchTag');
} else {
// normal
$products_name = $product_info['products_name'];
}
|
and:
Quote:
|
if ($display_search_results) $product_info['products_description'] = highlight_viewable_text($product_info['products_description'], $HTTP_GET_VARS['keywords'], 'searchTag');
|
This is the url i am recieving when searching for 'radio' from the search box:
Any ideas what other differences are affected using max rc3, or another way to make this work?
Thanks