Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Overzealous Search Engine!


zefeena

Recommended Posts

Hi, I sell a lot of very similar items, so the description for the items is the same, with the changeable details (size, colour) etc in the title. When customers use the quick find it brings up everything! On my old site the search facility only to searched the product title, now it appears to be searching the description too. If a customer types in 'black 16mm elastic' I want them to only see a list of black 16mm elastics, instead they see everything, with black/1/6/16/elastic in the description or title! Pages and pages of stuff. Anyone any ideas how I could just get it back to searching the title. Thank you, Kellie

Running a botched up version of  osCommerce Online Merchant v2.3.4 bootstrap with the dresscode theme installed, numerous add-ons, terrible coding, terrible website, but will have to make do until I have made up for my losses and can risk shutting down for a couple of weeks while I start all over again. - I did not install my program but am endeavouring to fix it with your help.

Link to comment
Share on other sites

Hi

 

osC 2.3 has the search in description option from 2.2 hard coded in so it always searches there.

 

To fix it grab a copy of 2.2 and compare to 2.3 for the advanced_search page -for the quick find box try this (not tested here but you'll get the idea)

 

Find the file bm_search .php and this code in it

 

  $data = '<div class="ui-widget infoBoxContainer">' .
		  '  <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_SEARCH_BOX_TITLE . '</div>' .
		  '  <div class="ui-widget-content infoBoxContents" style="text-align: center;">' .
		  '    ' . tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') .
		  '    ' . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: 75%"') . ' ' . tep_draw_hidden_field('search_in_description', '1') . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', MODULE_BOXES_SEARCH_BOX_TITLE) . '<br />' . MODULE_BOXES_SEARCH_BOX_TEXT . '<br /><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><strong>' . MODULE_BOXES_SEARCH_BOX_ADVANCED_SEARCH . '</strong></a>' .
		  '    </form>' .
		  '  </div>' .
		  '</div>';

 

either remove the tep_draw_hidden_field('search_in_description', '1') or else alter the 1 to something like 2 or 0

Link to comment
Share on other sites

  • 2 months later...

Thank you, changing the number to 2 seems to have worked! It took a little while to find the file. it is in catalogue/includes/modules/boxes

Running a botched up version of  osCommerce Online Merchant v2.3.4 bootstrap with the dresscode theme installed, numerous add-ons, terrible coding, terrible website, but will have to make do until I have made up for my losses and can risk shutting down for a couple of weeks while I start all over again. - I did not install my program but am endeavouring to fix it with your help.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...