Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Jul 2008
    Posts
    362
    Plugin Contributions
    0

    Default Add link in actual logo

    Hey Zenners,

    I have been going through threads for the past 2 days looking for a solution to what i want to do. I have tried heaps of solutions that have been posted but i cant seem to get it right!

    I am trying to move a shopping cart mod from the navigation bar into the logo just below and a simple search bar newxt to it on the same line basically replacing the currencies bar with the search and moving it into the logo..... Then deleteing the entire navigation bar so that the css header menu can be used instead.

    I have attached a pic!
    Link: www.truwater.com.au

    Thanks gee38l
    Attached Images Attached Images  

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Add link in actual logo

    I would say you are fighting a Template Monster Template issue...
    As they do not design within the ZenCart structure most anything you can find here will not apply
    You can search for them here are see the many issues
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jul 2008
    Posts
    362
    Plugin Contributions
    0

    Default

    Quote Originally Posted by kobra View Post
    I would say you are fighting a Template Monster Template issue...
    As they do not design within the ZenCart structure most anything you can find here will not apply
    You can search for them here are see the many issues
    Yeah someone said something like that before. Although I managed to get the item in cart into the nav bar! Surely I can do what I want to do it's just I think I'm placing the code in the wrong place. Can you please assist me?
    Posted via Mobile Device

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Add link in actual logo

    It probably can be done; the problem is that TM versions of template files are often so different from the standard version that we don't already know from our experience how to fix them. A few people have some experience with altering TM templates, but most of us don't want anything to do with them because they are such a stupid pain. The functions TM puts in could be done neatly within the standard structure, but they choose to mangle it.

  5. #5
    Join Date
    Jul 2008
    Posts
    362
    Plugin Contributions
    0

    Default Re: Add link in actual logo

    Quote Originally Posted by gjh42 View Post
    It probably can be done; the problem is that TM versions of template files are often so different from the standard version that we don't already know from our experience how to fix them. A few people have some experience with altering TM templates, but most of us don't want anything to do with them because they are such a stupid pain. The functions TM puts in could be done neatly within the standard structure, but they choose to mangle it.
    Yeah im finding TM templates to be a pain aswell! The initial web designers implemented this and i didnt know about it until i posted a problem here in which i then found out that it can be difficult to play with as most of the solutions here dont work as the code is customised, they have since been fired and i have taken over but i am new to all this so im learning :) So far i have managed to add the css header menu and place that to how i want using tpl_header, i have also added the cart bar into the nav header and placed that correctly and now they want me to change it how i have it layed out in the picture. So what can i do to get it like the pic im sure its just a matter of having the code in the correct place but knowing where the correct place is has proven to be pain as the code in tpl header is not defined like it is with the default templates etc. Glen i know you have assisted me before with the other things above what can i do to get this done?

    Thanks

  6. #6
    Join Date
    Jul 2008
    Posts
    362
    Plugin Contributions
    0

    Default Re: Add link in actual logo

    Anyone?

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Add link in actual logo

    Since we know the files are different from standard, there is no way anyone can help unless you post the tpl_header.php that you have, and possibly other relevant files. (Use [php] and [/php] tags for any files you post.)

  8. #8
    Join Date
    Jul 2008
    Posts
    362
    Plugin Contributions
    0

    Default Re: Add link in actual logo

    Sorry here is the tpl_header...

    PHP Code:
    <?php
    /**
     * Common Template - tpl_header.php
     *
     * this file can be copied to /templates/your_template_dir/pagename<br />
     * example: to override the privacy page<br />
     * make a directory /templates/my_template/privacy<br />
     * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
     * to override the global settings and turn off the footer un-comment the following line:<br />
     * <br />
     * $flag_disable_header = true;<br />
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
     */
    ?>
    <?php

        
      
    // Display all header alerts via messageStack:
      
    if ($messageStack->size('header') > 0) {
        echo 
    $messageStack->output('header');
      }
      if (isset(
    $_GET['error_message']) && zen_not_null($_GET['error_message'])) {
      echo 
    htmlspecialchars(urldecode($_GET['error_message']));
      }
      if (isset(
    $_GET['info_message']) && zen_not_null($_GET['info_message'])) {
       echo 
    htmlspecialchars($_GET['info_message']);
    } else {

    }
    ?>


    <!--bof-header logo and navigation display-->
    <?php
    if (!isset($flag_disable_header) || !$flag_disable_header) {
    ?>

        <?php
          
    if (SHOW_BANNERS_GROUP_SET1 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET1)) {
            if (
    $banner->RecordCount() > 0) {
        
    ?>
        
       <div id="bannerOne"><?php echo zen_display_banner('static'$banner); ?></div>
        <?php
            
    }
          }
        
    ?>
        
        <div class="menu">
            <div class="menu_r">
                <div class="menu_l">
                    <div class="menu_tr">
                        <div class="menu_tl">
                        
                            <div class="menu_pad">
                                <div class="navigation">
            
                        <div class="nav_1">
                            <?php #HEADER LINKS START ?>
                                    
                                    <a href="<?php echo HTTP_SERVER DIR_WS_CATALOG ?>"><?php echo HEADER_TITLE_CATALOG?></a>
                                    
                                <?php if ($_SESSION['customer_id']) { ?>
                                    &nbsp;|&nbsp; <a href="<?php echo zen_href_link(FILENAME_LOGOFF'''SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF?></a>
                                    &nbsp;|&nbsp; <a href="<?php echo zen_href_link(FILENAME_ACCOUNT'''SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT?></a> 
                                <?php
                                      
    } else {
                                        if (
    STORE_STATUS == '0') {
                                
    ?>
                                    &nbsp;|&nbsp; <a href="<?php echo zen_href_link(FILENAME_LOGIN'''SSL'); ?>"><?php echo HEADER_TITLE_LOGIN?></a>  
                                <?php } } ?>  
                                
                                <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
                                    &nbsp;|&nbsp; <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART'''NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS?></a>
                                    &nbsp;|&nbsp; <a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT?></a>
                                <?php ?>
                                        
                            <?php #HEADER LINKS END ?>    
                        </div>
                        
                        <div class="nav_2">
                            <?php #HEADER CURRENCIES START ?>                            
                            <?=zen_draw_form('currencies'zen_href_link(basename(ereg_replace('.php',''$PHP_SELF)), ''$request_typefalse), 'get')?>
                            <?php echo BOX_HEADING_CURRENCIES;?>: &nbsp;

                            <?
                            
                                if (isset($currencies) && is_object($currencies)) {
                            
                                  reset($currencies->currencies);
                                  $currencies_array = array();
                                  while (list($key, $value) = each($currencies->currencies)) {
                                    $currencies_array[] = array('id' => $key, 'text' => $value['title']);
                                  }
                            
                                  $hidden_get_variables = '';
                                  reset($_GET);
                                  while (list($key, $value) = each($_GET)) {
                                    if ( ($key != 'currency') && ($key != zen_session_name()) && ($key != 'x') && ($key != 'y') ) {
                                      $hidden_get_variables .= zen_draw_hidden_field($key, $value);
                                    }
                                  }
                                }
                            
                            ?><?=zen_draw_pull_down_menu('currency'$currencies_array$_SESSION['currency'], 'class="select" onchange="this.form.submit();"') . $hidden_get_variables zen_hide_session_id()?></form>
                                                
                            <?php #HEADER CURRENCIES END ?>    
                        </div>
                        
                        <div class="nav_3">
            <div id="navMainCartSummary"><?php require(DIR_WS_MODULES 'sideboxes/cart_summary.php'); ?></div>

                        </div>
                        
                        <div class="clear"></div>
                    </div>    
                                    
                                <div class="clear"></div>
                            </div>
                        
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="head">
            <div class="head_r">
                <div class="head_l">
                
                    <div class="logo">
                        <div class="spacer"><a href="<?php echo zen_href_link(FILENAME_DEFAULT);?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/logo.jpg'); ?></a></div>
                    </div>
                
                </div>
            </div>
        </div>
        
        <div class="spacer"><?php echo zen_draw_separator($image 'pixel_trans.gif''1''2');?></div> 
         
    <!--bof-drop down menu display-->
    <?php require($template->get_template_dir('tpl_drop_menu.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_drop_menu.php');?>
    <!--eof-drop down menu display-->
    <div class="clearBoth"></div>
                  
                            
                    <?php
                        
    if (SHOW_BANNERS_GROUP_SET2 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET2)) {
                            if (
    $banner->RecordCount() > 0) {
                    
    ?>
                            <div id="bannerTwo"><?php echo zen_display_banner('static'$banner);?></div>
                            <div class="spacer"><?php echo zen_draw_separator($image 'pixel_trans.gif''1''2');?></div> 
                    <?php
                            
    }
                          }
                    
    ?>
                    
        
    <?php ?>

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Add link in actual logo

    You have this long string of divs that enclose the various nav sections:
    <div class="menu">
    <div class="menu_r">
    <div class="menu_l">
    <div class="menu_tr">
    <div class="menu_tl">

    <div class="menu_pad">
    <div class="navigation">


    It looks like .nav_1 is the part you want to eliminate. As long as you have those functions elsewhere, you can delete that section.

    .nav_2 and .nav_3 are the parts you want to move into the logo area, so move those code blocks

    <div class="nav_2">
    <?php #HEADER CURRENCIES START ?>
    ...
    <?php #HEADER CURRENCIES END ?>
    </div>

    <div class="nav_3">
    <div id="navMainCartSummary">
    ...
    </div>
    </div>

    into this section
    PHP Code:
         <div class="head">
            <div class="head_r">
                <div class="head_l">
                
                    <div class="logo">
                        <div class="spacer"><a href="<?php echo zen_href_link(FILENAME_DEFAULT);?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/logo.jpg'); ?></a></div>
                    </div>
                
                </div>
            </div>
        </div>
    probably just after the
    <div class="spacer">
    line.

    You will need to make that spacer not occupy the whole logo width; in stylesheet_tm.css, just after
    .spacer {font-size:0px; line-height:0px;}
    add
    .logo .spacer {width:460px;}

    Eliminate the whole mess of divs before
    <div class="head">
    (starting with <div class="menu"> ).

    You will need to change a bunch of styles to make the nav divs look right in their new location.

  10. #10
    Join Date
    Jul 2008
    Posts
    362
    Plugin Contributions
    0

    Default Re: Add link in actual logo

    Ok i have just moved the code to where you had advised and it seems to be below the logo now.....

    (see pic)

    Displays new position in ff and doest show anything in IE

    Here is my current code:

    PHP Code:
    <?php
    /**
     * Common Template - tpl_header.php
     *
     * this file can be copied to /templates/your_template_dir/pagename<br />
     * example: to override the privacy page<br />
     * make a directory /templates/my_template/privacy<br />
     * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
     * to override the global settings and turn off the footer un-comment the following line:<br />
     * <br />
     * $flag_disable_header = true;<br />
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
     */
    ?>
    <?php

        
      
    // Display all header alerts via messageStack:
      
    if ($messageStack->size('header') > 0) {
        echo 
    $messageStack->output('header');
      }
      if (isset(
    $_GET['error_message']) && zen_not_null($_GET['error_message'])) {
      echo 
    htmlspecialchars(urldecode($_GET['error_message']));
      }
      if (isset(
    $_GET['info_message']) && zen_not_null($_GET['info_message'])) {
       echo 
    htmlspecialchars($_GET['info_message']);
    } else {

    }
    ?>


    <!--bof-header logo and navigation display-->
    <?php
    if (!isset($flag_disable_header) || !$flag_disable_header) {
    ?>

        <?php
          
    if (SHOW_BANNERS_GROUP_SET1 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET1)) {
            if (
    $banner->RecordCount() > 0) {
        
    ?>
        
       <div id="bannerOne"><?php echo zen_display_banner('static'$banner); ?></div>
        <?php
            
    }
          }
        
    ?>
        
        <div class="menu">
            <div class="menu_r">
                <div class="menu_l">
                    <div class="menu_tr">
                        <div class="menu_tl">
                        
                            <div class="menu_pad">
                                <div class="navigation">
            
                        <div class="nav_1">
                            <?php #HEADER LINKS START ?>
                                    
                                    <a href="<?php echo HTTP_SERVER DIR_WS_CATALOG ?>"><?php echo HEADER_TITLE_CATALOG?></a>
                                    
                                <?php if ($_SESSION['customer_id']) { ?>
                                    &nbsp;|&nbsp; <a href="<?php echo zen_href_link(FILENAME_LOGOFF'''SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF?></a>
                                    &nbsp;|&nbsp; <a href="<?php echo zen_href_link(FILENAME_ACCOUNT'''SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT?></a> 
                                <?php
                                      
    } else {
                                        if (
    STORE_STATUS == '0') {
                                
    ?>
                                    &nbsp;|&nbsp; <a href="<?php echo zen_href_link(FILENAME_LOGIN'''SSL'); ?>"><?php echo HEADER_TITLE_LOGIN?></a>  
                                <?php } } ?>  
                                
                                <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
                                    &nbsp;|&nbsp; <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART'''NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS?></a>
                                    &nbsp;|&nbsp; <a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT?></a>
                                <?php ?>
                                        
                            <?php #HEADER LINKS END ?>    
                        </div>
                        
                        
                        
                        <div class="clear"></div>
                    </div>    
                                    
                                <div class="clear"></div>
                            </div>
                        
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="head">
            <div class="head_r">
                <div class="head_l">
                
                    <div class="logo">
                        <div class="spacer"><a href="<?php echo zen_href_link(FILENAME_DEFAULT);?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/logo.jpg'); ?></a></div>
    <div class="nav_2">
                            <?php #HEADER CURRENCIES START ?>                            
                            <?=zen_draw_form('currencies'zen_href_link(basename(ereg_replace('.php',''$PHP_SELF)), ''$request_typefalse), 'get')?>
                            <?php echo BOX_HEADING_CURRENCIES;?>: &nbsp;

                            <?
                            
                                if (isset($currencies) && is_object($currencies)) {
                            
                                  reset($currencies->currencies);
                                  $currencies_array = array();
                                  while (list($key, $value) = each($currencies->currencies)) {
                                    $currencies_array[] = array('id' => $key, 'text' => $value['title']);
                                  }
                            
                                  $hidden_get_variables = '';
                                  reset($_GET);
                                  while (list($key, $value) = each($_GET)) {
                                    if ( ($key != 'currency') && ($key != zen_session_name()) && ($key != 'x') && ($key != 'y') ) {
                                      $hidden_get_variables .= zen_draw_hidden_field($key, $value);
                                    }
                                  }
                                }
                            
                            ?><?=zen_draw_pull_down_menu('currency'$currencies_array$_SESSION['currency'], 'class="select" onchange="this.form.submit();"') . $hidden_get_variables zen_hide_session_id()?></form>
                                                
                            <?php #HEADER CURRENCIES END ?>    
                        </div>
        <div class="nav_3">
            <div id="navMainCartSummary"><?php require(DIR_WS_MODULES 'sideboxes/cart_summary.php'); ?></div>

                        </div>
                    </div>
                
                </div>
            </div>
        </div>
        
        <div class="spacer"><?php echo zen_draw_separator($image 'pixel_trans.gif''1''2');?></div> 
         
    <!--bof-drop down menu display-->
    <?php require($template->get_template_dir('tpl_drop_menu.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_drop_menu.php');?>
    <!--eof-drop down menu display-->
    <div class="clearBoth"></div>
                  
                            
                    <?php
                        
    if (SHOW_BANNERS_GROUP_SET2 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET2)) {
                            if (
    $banner->RecordCount() > 0) {
                    
    ?>
                            <div id="bannerTwo"><?php echo zen_display_banner('static'$banner);?></div>
                            <div class="spacer"><?php echo zen_draw_separator($image 'pixel_trans.gif''1''2');?></div> 
                    <?php
                            
    }
                          }
                    
    ?>
                    
        
    <?php ?>
    Attached Images Attached Images  
    Last edited by gee38l; 17 Dec 2008 at 08:07 AM. Reason: ie

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v150 How do I link the logo.gif back to the site's actual index.htm page instead of store?
    By Scully in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 16 Sep 2013, 10:58 PM
  2. add a logo as a link to a sidebox?
    By artifaxworthing in forum Templates, Stylesheets, Page Layout
    Replies: 22
    Last Post: 26 May 2010, 02:28 AM
  3. How do I add RRP and actual price?
    By backinthesaddle in forum General Questions
    Replies: 1
    Last Post: 1 Mar 2009, 07:19 PM
  4. Add a Link beside my logo at the header
    By mthem2003 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 16 Feb 2008, 07:48 AM
  5. paypal IPN change text , text under link, add logo
    By keylesslocks in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 14 Jul 2007, 02:06 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