Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can the simple search box search descriptions...


Margo

Recommended Posts

Posted

I'm using version 2.2-MS2 and would like the simple search box to search not only the product names but also the product descriptions. I don't want the user to have to go to the Advanced search to do this. How do I get this to work?.

Thanks.

Posted

There is a contribution for this which I have implemented successfully.

  • 2 weeks later...
Posted

I just tried the contribution and it does work! I suggest trying again - it only takes uploading the new search.php file to see if it works, but be sure to also add the 2 new definitions into the english language file. I also went into search.php and removed the code for the manufacturers box since I don't used manufacturers.

 

It may be that you downloaded a bad file. There was a notation that the author had uploaded something incorrectly at one point. Go back to the contribution and try again.

Posted
but be sure to also add the 2 new definitions into the english language file. I also went into search.php and removed the code for the manufacturers box since I don't used manufacturers.  Delia

 

 

Delia, Could you be so kind as to show here what the code is that we're to add in the english file? And what code in the search.php removes manifacturers?

 

Appreciate your help

 

Lisa

GLK

Posted

ok. I managed to figure out what to comment out in the new search.php file to get rid of the manufacturers drop-down (see below for those that want to know). But I still don't know what to add in the language file. Please help. Lisa

 

 

 

 

$info_box_contents = array();

$info_box_contents[] = array('form' => tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'),

'align' => 'left',

'text' => BOX_SEARCH_TEXT . '<br>' . tep_draw_hidden_field('search_in_description','1') . tep_draw_hidden_field('inc_subcat', '1', true) . tep_draw_input_field('keywords','','size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . tep_image_submit('button_quick_find.gif', IMAGE_BUTTON_SEARCH) . '<br>' . tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)))) . '<br>' . /*tep_draw_pull_down_menu('manufacturers_id', tep_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)))) . '<br>' . */ tep_hide_session_id() . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>');

GLK

Posted

Just installed this and it works fine

 

the changes to the language file are as follows:

 

in catalog/includes/languages/english.php

 

find

 

define('BOX_SEARCH_ADVANCED_SEARCH','Advanced Search');

 

underneath it, insert two new lines:

 

define(TEXT_ALL_CATEGORIES','All Categories');

define(TEXT_ALL_MANUFACTURERS','All Manufacturers');

 

 

John

Archived

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

×
×
  • Create New...