View Full Version : move search & manufacturer boxes

12-28-2002, 12:43 PM

Anyone know how to move the search and manufacturer boxes above the product listing one on top of the other one?

12-28-2002, 05:52 PM
I am not quite understanding what it is you are trying to accomplish.

however the boxes are called via the left_column.php and right_column.php located in 'includes/'

just change the order in which they are listed.


12-28-2002, 06:57 PM
I am trying to move the search and manufacturers box to the product listing column or in the header. I just want the menus where you type the search item and not the whole box or the text.

Is this possible?

12-29-2002, 12:22 PM
It is possible, you just need to strip out the unwanted tags.

you can add search to any page really.

just use:

<form name="quick_find" method="get" action="http://www.yoururl.com/advanced_search_result.php">
<input type="text" name="keywords" size="10" maxlength="30" value="" style="width: 95px"> <input type="submit" value="go"><br>
<a href="http://www.yoururl.com/advanced_search.php"><b style="font-size:8pt;">Advanced Search</b></a>

that code there will call the search page from anywhere in your site.

or if you decide to strip out the unwanted tags.
open 'includes/boxes/search.php' and replace the code with the following.
all I did was remove the beginning html tags.
now it just includes the same as above.

$Id: search.php,v 1.21 2002/05/27 13:26:34 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions

Copyright (c) 2001 osCommerce

Released under the GNU General Public License
<!-- search //-->
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
new infoBoxHeading($info_box_contents, false, false);

$hide = tep_hide_session_id();
$info_box_contents = array();
$info_box_contents[] = array('form' => '<form name="quick_find" method="get" action="' . tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false) . '">',
'align' => 'center',
'text' => $hide . '<input type="text" name="keywords" size="10" maxlength="30" value="' . htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["keywords"])) . '" style="width: ' . (BOX_WIDTH-30) . 'px"> ' . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>'
new infoBox($info_box_contents);
<!-- search_eof //-->

then all you need to do is call this.

require(DIR_WS_BOXES . 'search.php');

you can do the same with any of the boxes including the manufacturers.


12-29-2002, 02:50 PM
Thank you!

I put both the form and the search code to test out and it worked.

Then I added the manufacturers code and that worked.

The first 5 lines under <!php will strip out the heading of the boxes so that worked also.

Where does this go and what does it do?
require(DIR_WS_BOXES . 'search.php');

I don't have this anywhere and the functions are working.

Other question is:
Is that form something that is on one of the php pages because I've been looking for it and couldn't find it?

This would be a good one for the manual!

12-29-2002, 06:17 PM

the large section of code is supposed to be saved as search.php and put into 'includes/boxes/'

then the :
require(DIR_WS_BOXES . 'search.php');

is used to call the search.php.

if you just pasted the form, or the large code snippet into your default.php, I guess that would also work as well.

and to answer you final question, this

require(DIR_WS_BOXES . 'search.php');

calls the search form, that would be why you would not be able to find the actual <form> tags

01-01-2003, 03:07 PM

I am having a lot of problems with moving the manufacturers box.

I had it working and then it stopped and now it is working again.

But, how do I remove the infobox outline around it? I want to keep that style for the left side categories.


01-27-2003, 05:10 PM
Hello, I read your post on your search code that can be put anywhere basically. I put your snipet of search code in the header so I can have a search box to the top right, just right of the logo. I could not get the formatting correct, it would put the search box below the logo and not to the right where the three little icons usually are for the cart features.

Could you help me out and show me how to get this to work?

Thank much,

Jay B. Hasman

01-27-2003, 07:24 PM

Please send me your link so I can look at it.

You can also send me your header page.