Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to put search box on right of the right column


Jackzzz

Recommended Posts

Posted

My web site has align center with width 780, I am trying to put the search box on right of the right column.

or put the search box on Left of the Left column. Any one knows how to write the script or any contribution.

I tried to find this kinds of contribution on oscommerce, but I can not find any one.

 

Thanks for help

Posted

Here's a little "trick".

 

First you MUST to rearrange your column left so the search box is at the bottom.

 

For example, stock osC code has it in /catalog/includes/column_left.php like this:

 

  require(DIR_WS_BOXES . 'whats_new.php');
 require(DIR_WS_BOXES . 'search.php');
 require(DIR_WS_BOXES . 'information.php');
?>

Just rearrange it like this:

 

  require(DIR_WS_BOXES . 'whats_new.php');
 require(DIR_WS_BOXES . 'information.php');
 require(DIR_WS_BOXES . 'search.php');
?>

Now in /catalog/includes/boxes/search.php find this code:

 

<!-- search //-->
	  <tr>
		<td>
<?php

Alter it to this:

 

<!-- search //-->
	  <tr>
		<td>

<!-- bof search box move code //-->

<div
  style="
  bottom: 125;
  left: -125;
  position: relative;
  z-index: 1;
  visibility: show;">

<!-- eof search box move code //-->

<?php

Then find this code in the same file:

 

?>
		</td>
	  </tr>
<!-- search_eof //-->

Alter it to this:

 

?>
<!-- bof search box move code //-->

</div>

<!-- eof search box move code //-->

		</td>
	  </tr>
<!-- search_eof //-->

In the code I posted you may have to adjust these numbers:

 

	  bottom: 125;
  left: -125;

In order to position the box where you want it.

 

I tested this using IE7 and Firefox and it worked in both browsers.

;)

 

BACKUP ANY FILES BEFORE EDITING.

 

You broke it - You bought it.

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Archived

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

×
×
  • Create New...