Jump to content

Archived

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

fan4chevy

Search Box In Header 2.3

Recommended Posts

I wanted to place a search box field in my header area but found no add ons for this. This is primarily for 2.3 but I am sure will work with 2.2.

 

This contrib will not change any existing scripts but rather simply adds simple fields in header.php and stylesheet.css. Real easy and quick.

 

Hope this helps,

 

Charles

fan4chevy

Share this post


Link to post
Share on other sites

Cool, I alway thought that the search function sucked.

 

Any directions to site that is using this already?

 

Cheers


-Peder Beckman-

Kool Kat Jazz Records

Share this post


Link to post
Share on other sites

Thanks @@fan4chevy great little add-on, makes a big difference :)


Find this post helpful? Click the 'Like this' button. :)

Share this post


Link to post
Share on other sites

Hi,

Does anybody have hint on how to put search box in header,then make the search box autocomplete? just something like in the

following link,but with autocomplete suggest feature:

http://forums.oscommerce.com/topic/370273-jquery-ui-autocomplete-search-box/

 

I put search box in the header,and add the autocompelte feature to it,when I enter 2 letters in the search box,then a long list containing these two letter appear,but when I select one of them,this action does not fire any action,can not automatically produce search page on the select product.I don't know how to modify it to make it work.

 

Thanks!

 

Joe

 

Thanks!

 

Joe

Share this post


Link to post
Share on other sites

Mine has it and it works great! It will search keywords, titles and descriptions

 

i put this on my header, but the search button does not have a hand hovering over it

 

how do you change this so that it does?

 

something is not right with this code

 

someone advise

Share this post


Link to post
Share on other sites

@@vampirehunter

 

This type of button doesn't have a hand by default in the browser.You can add it in css.

 

Give the button an id and in css give it an attribute

cursor: pointer; 


Find this post helpful? Click the 'Like this' button. :)

Share this post


Link to post
Share on other sites

Hello

 

I've installed in my header but I can't click on it!

 

There's just an arrow when I place the cursor over it. I have an idea that the reply above solves but can't understand what to do.

 

Can someone be more explicit please.

 

Thank you!

 

Lorraine

Share this post


Link to post
Share on other sites

As an update to this contribution:

 

http://addons.oscommerce.com/info/8351

 

here is the changes to have your search button as an image instead of the boring submit button

 

Find this line in /includes/header.php (assuming you already have the addon installed)

 

<div id="searchbox">
<?php 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="100" style="width: ' . (140) . 'px"') . ' ' . tep_hide_session_id() .'<input type="submit" name="Submit" value="Search">' . '</form>';
?>
</div>

 

and change it to this:

<div id="searchbox">
<?php 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="100" style="width: ' . (140) . 'px"') . ' ' . tep_hide_session_id() .'<input type="submit" value="" name="button" id="button" class="searchbutton" />' . '</form>';
?>
</div>

 

then add this to your stylesheet:

 

#searchbox {
float: right;
margin-top:-41px;
margin-right: 25px;
}

.searchbutton {
background:url(path/to/your/search/image);
width:25px;
height:25px;
border:0px;
}

 

in .searchbutton....change the width and height to what ever your image dimensions are.

 

Have fun....

 

Steven

Share this post


Link to post
Share on other sites

×