Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] - Search Box Anywhere


Recommended Posts

hi tim,

i want to use option 4 of ur contrib but i want to know if you could help me change it so that the keyword box is above the catgories box, is it easy to change?

 

theres the code for quick ref:

 

<?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="30" style="width: ' . (BOX_WIDTH+10) . 'px"') . ' ' . tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => BOX_ALL_CATEGORIES)))) . ' ' . '<input type="submit" name="Submit" value="Search">' . '</form>'; ?>

 

thanks

Link to comment
Share on other sites

  • Replies 81
  • Created
  • Last Reply

Top Posters In This Topic

hi tim,

i want to use option 4 of ur contrib but i want to know if you could help me change it so that the keyword box is above the catgories box, is it easy to change?

 

theres the code for quick ref:

 

<?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="30" style="width: ' . (BOX_WIDTH+10) . 'px"') . ' ' . tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => BOX_ALL_CATEGORIES)))) . ' ' . '<input type="submit" name="Submit" value="Search">' . '</form>'; ?>

 

thanks

 

Hi Ian,

 

The following will display the search box with the drop down categories and search button under it. You can change the width of the search box by changing BOX_WIDTH+10.

<?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="30" style="width: ' . (BOX_WIDTH+10) . 'px"') . '<br>' . tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => BOX_ALL_CATEGORIES)))) . ' ' .  '<input type="submit" name="Submit" value="Search">' . '</form>'; ?>

 

Good luck and let me know if need anything else.

Tim

Link to comment
Share on other sites

hi tim,

thanks for that code, it works great (i feel like an idiot now coz it was simple to change lol)

 

anyway, the search is in the right corner of the header but its next to my header pic which goes right across the page,

 

so do i need to change the search code so that it goes over the top of the pic or have i got to change something in the pic code to set it as a background?

 

any tips on how would be greatly apprechiated aswell,

 

thanks,

 

:thumbsup:

Link to comment
Share on other sites

oooH sweet i was fighting with this.

 

Hi,

 

I think I posted a question in the forum somewhere before I saw this contribution. I have installed the search box everywher.

 

There is a space left on top of the box. I guess this space use to display "Search" or something like that. Can you tell me how to display a "search" text on top of the box?

 

Thanks for the great work.

Link to comment
Share on other sites

Hi,

 

I think I posted a question in the forum somewhere before I saw this contribution. I have installed the search box everywher.

 

There is a space left on top of the box. I guess this space use to display "Search" or something like that. Can you tell me how to display a "search" text on top of the box?

 

Thanks for the great work.

 

There are several ways to do this. The easiest way would be to display the Search Box Everywhere code after your desired text. For example, "Search<br>(Search Box code)". This would display "Search" on top of the search box. You could also use tables. Good luck and let me know if you need more help.

Link to comment
Share on other sites

There are several ways to do this. The easiest way would be to display the Search Box Everywhere code after your desired text. For example, "Search<br>(Search Box code)". This would display "Search" on top of the search box. You could also use tables. Good luck and let me know if you need more help.

 

 

Hi,

 

I tried using search<br> and it didn't work for me. I tried to use the table like this:

 

<tr>

<td colspan="2" rowspan="2" valign="top"><?php echo /*'<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . */tep_image(DIR_WS_IMAGES . 'oscommercebottom_left.gif', '') . '</a>'; ?>

<td height="10" colspan="2" valign="top">search </td>

<?php echo /*'<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . */tep_image(DIR_WS_IMAGES . 'oscommercebottom_right.gif', '') . '</a>'; ?></td>

</tr>

<tr>

<td height="14" colspan="2" valign="top"><?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="30" style="width: ' . (BOX_WIDTH+1) . 'px"') . ' ' . tep_image_submit('button_quick_find.gif', 'align="middle"') . '</form>'; ?> </td>

</tr>

 

 

That also didn't work. what is happening is that the "search box" with search on top of it is off the page to the right. i am not sure how else to put it in, I used dreamweaver to do the tables.

 

More help will be appreciated.

 

Thanks.

Link to comment
Share on other sites

  • 3 weeks later...

Search Box Anywhere - Update 3

 

This package fixes a problem with the code: a customer with items in their cart could lose the contents of their cart after performing a search and adding items to their cart.

 

Download the update at http://www.oscommerce.com/community/contributions,3295.

Link to comment
Share on other sites

Hallo!

I'm trying to find a way to combine a search box for products (standard/advanced search) and articles via Article Manager.

http://www.oscommerce.com/community/contributions,1709

I don't know if this is possible with a modified version of this contribution and would be most grateful if anyone has got some advice on how to combine Article search with Search Box Anywhere?

Best regards,

Terje

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 3 weeks later...
  • 1 month later...
Hello! Your contribution is exactly what I am looking for!! I want to install it in the top bar before MY ACCOUNT/CART CONTENTS/CHECKOUT... Could you please tell me what file I have to modify? :)

 

Thanks!

 

Simone

 

Hi Simone,

 

Open the file /catalog/includes/header.php and find the following around line 64:

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>

 

You can insert the Search Box Anywhere code after <td align="right" class="headerNavigation"> from above and it should give you the effect you desire.

 

Let me know if you have any problems.

Tim

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...
  • 2 weeks later...

Hi, I see its a great contribution. And try to install it and nothing happened.

 

I think because I have installed STS on my shop.

 

Can someone help me with that installation with STS.

 

Thans you for your assistance!

 

FUAD

Edited by wheeloftime

Peace and Love for all...

Link to comment
Share on other sites

Also How about "login box anywhere" . Like your contribution, only 2 tep_field(one username secaond password) and login button. In addition to this, it can be replacement of "greet_user". So if a users log in the login fields change to "Hello Mrs Bryan etc.." I know it must be simple but i am not a programmer.

 

Exactly! In the place of "greet_user" or in header it would be perfect, please make such a contribution and you'll become a hero of osC! :thumbsup:

Link to comment
Share on other sites

Congratulations to all, specially to Bigredman74. This contributin is great.

 

But I cant install on my store, because I have STS installed. My Store - Yo can see it

 

Can anyone tell me how to do it with sts? PLEASE HELP ME, HELP ME...............

 

THANKS,

 

FUAD

Peace and Love for all...

Link to comment
Share on other sites

  • 4 weeks later...

Hi all

I installed this contribution and it works really well, but i think there is still something to do to be perfect. Unless i didn't install it correctly and this feature doesn't work just in my shop.

 

I installed the option number 4 if i don't remember badly (the one with the box, the categories drop down and the "search" button). The thing is, in the drop down combo, i have for example:

 

Categorie 1

Categorie 2

->subcategory 1

->subcategory 2

 

If I select Categorie 1 and i search for a product which i know is in subcategory 1 or 2, shouldn't it appear?? Because it doesn't. And i think it happens in all shops.

 

I looked into advanced_search.php and i saw there is an option which says "include subcategories". Maybe you just have to add this option to the contrib?

 

You cna have a look in my webpage, http://www.pchousemadrid.com

 

Cheers!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...