Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Looking for an improved Search Box


Kopite

Recommended Posts

Looking to make my search box much more simple.

 

ie. one line to enter query and one button to click 'go'.

 

I would also like to put a simple quick search box next to my logo in STS - can I do this?

 

Thanks./

Link to comment
Share on other sites

Looking to make my search box much more simple.

 

ie. one line to enter query and one button to click 'go'.

 

I would also like to put a simple quick search box next to my logo in STS - can I do this?

 

Thanks./

 

Hi Kopite,

 

The file to modify the text in your search box is:

catalog/includes/languages/english.php (or whichever language file you are displaying as default)

 

look for this code to modify:

// quick_find box text in includes/boxes/quick_find.php
define('BOX_HEADING_SEARCH', 'Quick Find');
define('BOX_SEARCH_TEXT', 'Find Products.');
define('BOX_SEARCH_ADVANCED_SEARCH', 'Advanced Search');

 

As far as inserting a search box I suppose you could try to call the search box the way that it is called by default. At the location where you want to call the search box, type:

require(DIR_WS_BOXES . 'search.php');

and hopefully that does it for ya. I haven't made that change so I don't know what the result will be...proceed with caution! :-"

Link to comment
Share on other sites

Exchange the code in includes/boxes/search.php with this

<?php
/*
 $Id: search.php,v 1.22 2003/02/10 22:31:05 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
echo tep_draw_form('search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH+10) . 'px"');
echo '<br>';
echo tep_image_submit('button_search.gif', BOX_HEADING_ADVSEARCH, 'align="center"')  . '</form>';

?>

About as simple as I could make it - no boarder, no heading, just a box to type your search text and a button. Back up the old one first!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...