Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Your search for x returned the following results..


Recidivist

Recommended Posts

Out of the 'box' oscommerce does not provide a reference to what a user searched for on the results page. Adding:

 

Your search for <strong><?php echo($HTTP_GET_VARS['keywords']); ?></strong> returned the following results:

 

can provide reassurance to your buyers and remind them what they searched for.

 

Just insert the code where you choose (above the results is best :D ) on advanced_search_result.php.

 

k.

Network Webcams - The IP Camera Specialists

Link to comment
Share on other sites

Kev;

 

Good tip, thank you!

I took it a bit further so the text would be defined in the language file and messed around with the font style and size to produce the result I was after:

 

In catalog/advanced_search_result.php (about line 156), find the line

            <td class="pageHeading"><?php echo HEADING_TITLE_2; ?></td>

and change it to read

            <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');

and change it to read

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, of course, create a new class in your stylesheet or leave the page heading class, according to your preferences.

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

  • 2 months later...

As I posted before, I like this change and think it's great.

 

Today I noticed that, when searching for anything with an inch sign (e.g., 7" vise), it shows "your search for a 7\" ... (puts the backward slash in as part of the result).

 

Is there a change I can make so the backward slash isn't there? And if so, could you please be very specific as to where I make the change. Forgive my asking for specifics, but I am a newbie... :-"

 

Thanks so much.

Link to comment
Share on other sites

  • 5 months later...
  • 8 months later...

This is great, however, when searching for anything with an inch sign (e.g., 7" wheel), search comes back as "your search for a 7\" ... (puts the backward slash in as part of the result).

 

Is there a change I can make so the backward slash isn't there? It messes up the search so that 7" wheel comes back as not being found. I can search for 7" (without the word wheel) and it finds the 7" wheel, but it won't find it if entered as 7" wheel. This is important, as customers look for size/name all the time and search is telling them "not found", so customers go elsewhere, thinking we don't have that item. :(

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...