Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Posts
    119
    Plugin Contributions
    0

    Default Moving sidebox into header, need help please!

    i'm trying to move the sidebox "Search Products" (top left hand sidebox) to the header between "Tagline Here" and "Log in". I copied tpl_header.php into common folder of template in use (as per other post i found on forum) and have been messing around with locations within tpl_header.php but cant get it to work.

    Can somebody please take a quick look and tell me where in the tpl_header.php file I should be pasting the new code and if i need to paste all the contents of the sidebox file or what?

    The code below is the file as currently in the sideboxes folder, and is displaying & working in the shop now as a sidebox.

    Site is http://www.motorcycleparts.ie/store and uses 1.3.9

    I've deleted the header picture because i wasnt sure if the jpg was hiding the search box when i tried doing this myself... it wasn't and the results of my latest effort are still visible on site so just ignore the mess ;-)

    Thanks for all help and comments

    Iddy

    Code:
    <?php
    /**
     * blank sidebox - allows a blank sidebox to be added to your site
     *
     * @package templateSystem
     * @copyright 2007 Kuroi Web Design
      * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: blank_sidebox.php 2007-05-26 kuroi $
     */
    
      $content = '';
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
    
    
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '">';
    
    $content .= '<div style="text-align:left; padding-top:0px;">
    <form name="search_results" action="./index.php" method="get">
    <input type="hidden" name="main_page" value="search_results">
    <div class="back" style="padding-right:10px;">
    <div><b>Product</b>&nbsp;<span id="load1"></span></div>
    <font id="pawel_product">
    <select name="product" onchange="requestCustomerInfo()" style="width:200px;" id="product">
    <option value="free">Please select Product</option>';
    
    $sql = "select distinct se_product  from ". TABLE_SEARCH_ENGINE_MAKE ."
                               where se_product > '0'
    			   order by se_product ASC";
    $result=mysql_query($sql);
    $nazwa_product1 = '';
    $p ='0';
    while ($row=mysql_fetch_array($result)){
    
    $product=$row["se_product"];
    
    $array_product = explode(',', $product);
    
    //print_r($array_product);
    
    if($k=='0'){
    $array_product_final = $array_product;
    $size_of_final = sizeof($array_product_final);
    }
    
    for ($i=0; $i<sizeof($array_product); $i++) {
    
    if($p=='0'){
    $add='yes';
    }
    else{
    $add='';
    for ($j=0; $j<sizeof($array_product_final); $j++) {
    
    if($array_product[$i]==$array_product_final[$j]){
    $add='no';
    }
    }
    
    if($add=='no'){
    }
    else{
    $add='yes';
    }
    
    }
    
    
    if($add=='yes'){
    
    if($p<=$size_of_final){
    }
    else {
    $array_product_final[] = $array_product[$i];
    }
    
    }
    
    }
    
    $p++;
    }
    
    //print_r($array_product_final);
    sort($array_product_final);
    for ($w=0; $w<sizeof($array_product_final); $w++) {
    
    $content .= '<option value="' . $array_product_final[$w] .'">'. $array_product_final[$w]. $add_year.'</option>' . "\n";
    
    }
    
    //$make=$row["se_product"];
    //$content .= '<option value="' . $make .'">'. $make. '</option>' . "\n";
    
    $content .= '</select>
    </font>
    </div>
    
    <div class="back" style="padding-right:10px;">
    <div><b>Make</b>&nbsp;<span id="load2"></span></div>
    <font id="make">
    <select name="make" style="width:200px;" id="make2">
    <option value="free">Make</option>
    </select>
    </font>
    
    </div>
    
    <div class="back" style="padding-right:10px;">
    <div><b>Model</b>&nbsp;<span id="load3"></span></div>
    <font id="model">
    <select name="model" style="width:200px;" id="model2">
    <option value="free">Model</option>
    </select>
    </font>
    
    </div>
    
    
    <div class="back">
    <div><b>Exact model</b>&nbsp;<span id="load4"></span></div>
    <font id="exac_model">
    <select name="exac_model" style="width:200px;" id="exac_model2">
    <option value="free">Exact model</option>
    </select>
    </font>
    </div>
    <br class="clearBoth" />
    </form>
    </div>';
    
    
      $content .= '</div>';
    
      $content .= '</div>';
    ?>

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Moving sidebox into header, need help please!

    It's a lot easier to do that in the stylesheet.

    If you look HERE, the boxes at the top are Blank Sideboxes. The Archery box looks like this in the stylesheet:

    #leftsidebox {
    position:absolute; top:43px; right:422px;
    }


    One caveat - the sidebox in the header has to be the same width as the other sideboxes in whatever column it's activated in.

    You may have to add an IE6 stylesheet to get it right in that browser.

  3. #3
    Join Date
    Jan 2009
    Posts
    119
    Plugin Contributions
    0

    Default Re: Moving sidebox into header, need help please!

    Quote Originally Posted by stevesh View Post
    One caveat - the sidebox in the header has to be the same width as the other sideboxes in whatever column it's activated in.
    You've just given the reason why i want to move this sidebox into the header. i'll switch it off so it wont show on the left then.. The sidebox is ruining the layout of the rest of the column so I want to move it into the header where i can (hopefully) set the width to suit it and not have it effect anything else.

 

 

Similar Threads

  1. v150 Need Header Help Please!!!
    By Darion in forum General Questions
    Replies: 9
    Last Post: 20 Sep 2012, 08:33 PM
  2. Need urgent help please - Suddenly can't get into Admin
    By beyre in forum General Questions
    Replies: 2
    Last Post: 16 Nov 2009, 05:28 PM
  3. need help fixing my forum link in sidebox please
    By ttimbo75 in forum General Questions
    Replies: 8
    Last Post: 6 Jun 2007, 02:46 PM
  4. Need to add Sound Effects. Hours into this. Please help
    By bumba000 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 27 May 2007, 06:29 AM
  5. Need help changing Sidebox font colour please
    By angelicdezigns in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 12 Apr 2007, 02:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg