osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Highlight search results

This is a discussion on Highlight search results within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; Hello, I am trying to highlight the search results from the search box. I followed this tip/trick, made a few ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 04-06-2007, 04:31 AM
Member
 
Join Date: Mar 2004
Posts: 78
Thanks: 38
Thanked 0 Times in 0 Posts
Rep Power: 0
altenter
Default Highlight search results

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 = '&nbsp;<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a>&nbsp;';
}
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #2  
Old 04-06-2007, 04:40 AM
Member
 
Join Date: Mar 2004
Posts: 78
Thanks: 38
Thanked 0 Times in 0 Posts
Rep Power: 0
altenter
Default Re: Highlight search results

forgot to mention, i also added tep_hide_session_id() . tep_draw_hidden_field('hl',1) to the search box.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 06-08-2007, 05:01 AM
Member
 
Join Date: Mar 2004
Posts: 78
Thanks: 38
Thanked 0 Times in 0 Posts
Rep Power: 0
altenter
Default Re: Highlight search results

Can anyone point me to the right direction to achieve the search word highlighted in the results?
Only results from the search box are needed to be highlighted.
Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Search not showing results. JonCloud420 osCMax v2 Installation issues 0 09-03-2006 07:59 PM
filter results no1uknow osCMax v2 Customization/Mods 1 07-22-2006 10:24 PM
modifing meta_tags.php to help search results? Redeye_Joe osCMax v2 Customization/Mods 1 02-20-2006 07:08 AM
Remove 'Buy Now' button in AABox template Search Results DigitalPimp osCMax v2 Installation issues 4 09-01-2005 08:11 AM
saving "search" results GamerGoal osCMax v1.7 General Mods Discussion 0 01-15-2005 08:41 AM


All times are GMT -8. The time now is 11:21 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax