Zen Cart Logo
Forums / All Other Contributions/Addons / CSS Dropdown menu for the header- With Categories!

CSS Dropdown menu for the header- With Categories!

Views: 615,590

Results 1,541 to 1,560 of 2,344
3 Apr 2009, 5:34 AM
#1541
medibiz avatar

medibiz

New Zenner

Join Date:
Feb 2009
Posts:
12
Plugin Contributions:
0

CSS Dropdown menu for the header- With Categories!

Jettrue,

Subject: spontaneously expanded or automatically expanded sub-menus

Thanks for you support. I figured out what was causing the sub-menu auto-expand behavior (at least on my site). I wanted to post my fix to help others who might encounter this problem in the future. The problem was origionally described in post #52 and several others (like post #506) had this problem. If someone has posted a fix then I must have missed it. The problem crops up when the stylesheet_header_menu.css file is modified.

NOTE: The problem does not occur with an unmodified CSS Drop Menu.

RESOLUTION: In the stylesheet_header_menu.css do NOT add a "width: XXem;" value to the "div#dropMenu ul ul {}" line.

To fix the problem remove the "width:" statement from the "div#dropMenu ul ul" line. For those using Paul's Menu please take note; in Paul's Menu this width value IS specified to prevent the image on the very top row from extending onto neighboring cells.

What is happening is that the IE7 browser will remember this value after the first sub-menu mouse-over. And when you mouse-over the top menu a second time, the sub-menu cell width is then used/displayed. So what you see is expanded sub-menus void of menu text. If you encounter this problem, please check where you are specifying your "width:" statements.

I hope this may help others.

David

9 Apr 2009, 9:01 AM
#1542
thomasharding avatar

thomasharding

Zen Follower

Join Date:
Sep 2007
Location:
Manchester, England
Posts:
168
Plugin Contributions:
0

Re: CSS Dropdown menu for the header- With Categories!

Hey All,

This is one of those mods which have been modded under different names, so I'm unsure whether I should be posting this issue in here or not.

I'm using the Paul's version of this (Paul - if you're watching, this is an amazing module, saved me a lot of time!)

Anyway, I have several categories, all of which, bar one, have subcategories assigned to them.

The one which doesn't have subcategories doesn't display correctly. All the category links on the horizontal header have all been assigned 'level1' classes except the one.

Anyone had this issue?

Thanks :D

13 Apr 2009, 12:08 AM
#1543
determined1 avatar

determined1

New Zenner

Join Date:
Apr 2009
Posts:
2
Plugin Contributions:
0

Re: CSS Dropdown menu for the header- With Categories!

HELP PLEASE!!!
I cannot seem to get my css dropdown menu to work.
I believe I've followed the instructions carefully and I have also changed the chmod for my config file. what do i do? please see what it looks like here:
http://www.kidspalace.co.uk/zen
Its the box in red with an error message in it.

thanks.:cry:

13 Apr 2009, 7:37 PM
#1544
southport_red avatar

southport_red

New Zenner

Join Date:
Oct 2008
Posts:
12
Plugin Contributions:
0

Re: CSS Dropdown menu for the header- With Categories!

Hoping someone can help me as I have searched this thread time and again and not found a solution. I installed this excellent mod and in Safari and Firefox it works perfectly, however (you know what I'm about to say) in IE the menus are in the wrong place, they appear half way up my header and bisect my logo etc.

You can see what I mean at https://www.workshop-resources.com.

I have downloaded IE8 and if I turn the compatibility mode on it displays correctly (confirming this to be IE's fault). Any advice re how I change it so it displays just as well in pre- version 8 IE?

Any suggestions gratefully received as this is driving me nuts.

Regards
Fred

13 Apr 2009, 7:43 PM
#1545
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: CSS Dropdown menu for the header- With Categories!

determined1:

HELP PLEASE!!!
I cannot seem to get my css dropdown menu to work.
I believe I've followed the instructions carefully and I have also changed the chmod for my config file. what do i do? please see what it looks like here:
http://www.kidspalace.co.uk/zen
Its the box in red with an error message in it.

thanks.:cry:

if you changed the chmod for the config file correctly, you would no longer be having that error. Try again. :smile: Are you trying to chmod the permissions through a FTP program? Try chmod'ing it through your site's control panel.

16 Apr 2009, 2:21 PM
#1546
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: CSS Dropdown menu for the header- With Categories!

Hi All,

I wonder if someone could help with this. I've been customising my drop down menu so that the "My Account" button reads "Sign Up / Sign In"

I've taken the sub menu away from it so that you need to click the top level button to goto my custom login page.

When you're signed into the site, the sub menu will drop down again giving log off and newsletter menus.

All is working well in FF but in IE7 I have this annoying line which drops down when hovering over top level button:

This is my customised tpl_drop_menu.php:

<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers                           |
// |                                                                      |
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | [email protected] so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id: tpl_drop_menu.php  2005/06/15 15:39:05 DrByte Exp $
//

?>
<!-- menu area -->

<div id="dropMenuWrapper">
  <div id="dropMenuWrapperb">
    <div id="dropMenuWrapperc">
      <div id="dropMenuWrapperd">
        <div id="dropMenu">
         <ul class="level1">
            <li class="submenu"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo HEADER_TITLE_CATALOG; ?></a>
            </li>
            
            <li><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CONTACT_US; ?></a></li>

            <li><a href="<?php echo zen_href_link(FILENAME_ADVANCED_SEARCH); ?>"><?php echo HEADER_TITLE_SEARCH; ?></a></li>
            
              <?php
 // load the UL-generator class and produce the menu list dynamically from there
 require_once (DIR_WS_CLASSES . 'categories_ul_generator.php');
 $zen_CategoriesUL = new zen_categories_ul_generator;
 $menulist = $zen_CategoriesUL->buildTree(true);
 $menulist = str_replace('"level4"','"level5"',$menulist);
 $menulist = str_replace('"level3"','"level4"',$menulist);
 $menulist = str_replace('"level2"','"level3"',$menulist);
 $menulist = str_replace('"level1"','"level2"',$menulist);
 $menulist = str_replace('<li class="submenu">','<li class="submenu">',$menulist);
 $menulist = str_replace("</li>\n</ul>\n</li>\n</ul>\n","</li>\n</ul>\n",$menulist);
 echo $menulist;
?>
            <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
            <li class="submenu"><a class="noLine" href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>
              <ul class="level2">
                <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
              </ul>
            </li>
            <?php } else { ?>
            <li><a class="noLine" href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
            <?php } ?>
            
              
              <li class="submenu"><a class="noLine" href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>
              <ul class="level2">
                <?php if ($_SESSION['customer_id']) { ?>
                <li><a class="noLine" href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
                <li><a class="noLine" href="<?php echo zen_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL'); ?>"><?php echo HEADER_TITLE_NEWSLETTERS; ?></a></li>
                <?php } else { ?>
                <?php } ?>
              </ul>
            </li>

            
                        </li>
            <li class="submenu"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo HEADER_TITLE_INFORMATION; ?></a>
              <ul class="level2">
			    <?php if (DEFINE_SHIPPINGINFO_STATUS <= 1) { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_SHIPPING); ?>"><?php echo HEADER_TITLE_SHIPPING_INFO; ?></a></li>
				<?php } ?>
			    <?php if (DEFINE_PAYMENTS_STATUS <= 1) { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_PAYMENTS); ?>"><?php echo HEADER_TITLE_PAYMENTS; ?></a></li>
				<?php } ?>
				<?php if (DEFINE_PRIVACY_STATUS <= 1)  { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_PRIVACY); ?>"><?php echo HEADER_TITLE_PRIVACY_POLICY; ?></a></li>
				<?php } ?>
                <!--<li><a href="<?php echo zen_href_link(FILENAME_ABOUT_US); ?>"><?php echo HEADER_TITLE_ABOUT_US; ?></a></li>-->
                <?php if (DEFINE_SITE_MAP_STATUS <= 1) { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_SITE_MAP); ?>"><?php echo HEADER_TITLE_SITE_MAP; ?></a></li>
                <?php } ?>
                <?php if (MODULE_ORDER_TOTAL_GV_STATUS == 'true') { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_GV_FAQ, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_GV_FAQ; ?></a></li>
                <?php } ?>
                <?php if (MODULE_ORDER_TOTAL_COUPON_STATUS == 'true') { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_DISCOUNT_COUPON, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_DISCOUNT_COUPON; ?></a></li>
                <?php } ?>
                <?php if (SHOW_NEWSLETTER_UNSUBSCRIBE_LINK == 'true') { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_UNSUBSCRIBE; ?></a></li>
                <?php } ?>
                <?php require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?>
                <li><a href="index.php?main_page=reviews">Recent Reviews</a></li>
              </ul>
            </li>          
        </div>
      </div>
    </div>
      </tr>
  </div>
</div><!-- end dropMenuWrapper-->
<div class="clearBoth"></div>

Can anyone see what's causing the annoying phantom drop down in IE7??

16 Apr 2009, 3:44 PM
#1547
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: CSS Dropdown menu for the header- With Categories!

limelites:

Hi All,

I wonder if someone could help with this. I've been customising my drop down menu so that the "My Account" button reads "Sign Up / Sign In"

I've taken the sub menu away from it so that you need to click the top level button to goto my custom login page.

When you're signed into the site, the sub menu will drop down again giving log off and newsletter menus.

All is working well in FF but in IE7 I have this annoying line which drops down when hovering over top level button:

This is my customised tpl_drop_menu.php:

<?php // // +----------------------------------------------------------------------+ // |zen-cart Open Source E-commerce | // +----------------------------------------------------------------------+ // | Copyright (c) 2003 The zen-cart developers | // | | // | http://www.zen-cart.com/index.php | // | | // | Portions Copyright (c) 2003 osCommerce | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the GPL license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | http://www.zen-cart.com/license/2_0.txt. | // | If you did not receive a copy of the zen-cart license and are unable | // | to obtain it through the world-wide-web, please send a note to | // | [email protected] so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // $Id: tpl_drop_menu.php 2005/06/15 15:39:05 DrByte Exp $ // ?> <!-- menu area --> <div id="dropMenuWrapper"> <div id="dropMenuWrapperb"> <div id="dropMenuWrapperc"> <div id="dropMenuWrapperd"> <div id="dropMenu"> <ul class="level1"> <li class="submenu"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo HEADER_TITLE_CATALOG; ?></a> </li>
        <li><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CONTACT_US; ?></a></li>

        <li><a href="<?php echo zen_href_link(FILENAME_ADVANCED_SEARCH); ?>"><?php echo HEADER_TITLE_SEARCH; ?></a></li>
        
          <?php

// load the UL-generator class and produce the menu list dynamically from there
require_once (DIR_WS_CLASSES . 'categories_ul_generator.php');
$zen_CategoriesUL = new zen_categories_ul_generator;
$menulist = $zen_CategoriesUL->buildTree(true);
$menulist = str_replace('"level4"','"level5"',$menulist);
$menulist = str_replace('"level3"','"level4"',$menulist);
$menulist = str_replace('"level2"','"level3"',$menulist);
$menulist = str_replace('"level1"','"level2"',$menulist);
$menulist = str_replace('<li class="submenu">','<li class="submenu">',$menulist);
$menulist = str_replace("</li>\n</ul>\n</li>\n</ul>\n","</li>\n</ul>\n",$menulist);
echo $menulist;
?>
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
<li class="submenu"><a class="noLine" href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>
<ul class="level2">
<li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
</ul>
</li>
<?php } else { ?>
<li><a class="noLine" href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
<?php } ?>

          <li class="submenu"><a class="noLine" href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>
          <ul class="level2">
            <?php if ($_SESSION['customer_id']) { ?>
            <li><a class="noLine" href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
            <li><a class="noLine" href="<?php echo zen_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL'); ?>"><?php echo HEADER_TITLE_NEWSLETTERS; ?></a></li>
            <?php } else { ?>
            <?php } ?>
          </ul>
        </li>

        
                    </li>
        <li class="submenu"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo HEADER_TITLE_INFORMATION; ?></a>
          <ul class="level2">
		    <?php if (DEFINE_SHIPPINGINFO_STATUS <= 1) { ?>
            <li><a href="<?php echo zen_href_link(FILENAME_SHIPPING); ?>"><?php echo HEADER_TITLE_SHIPPING_INFO; ?></a></li>
			<?php } ?>
		    <?php if (DEFINE_PAYMENTS_STATUS <= 1) { ?>
            <li><a href="<?php echo zen_href_link(FILENAME_PAYMENTS); ?>"><?php echo HEADER_TITLE_PAYMENTS; ?></a></li>
			<?php } ?>
			<?php if (DEFINE_PRIVACY_STATUS <= 1)  { ?>
            <li><a href="<?php echo zen_href_link(FILENAME_PRIVACY); ?>"><?php echo HEADER_TITLE_PRIVACY_POLICY; ?></a></li>
			<?php } ?>
            <!--<li><a href="<?php echo zen_href_link(FILENAME_ABOUT_US); ?>"><?php echo HEADER_TITLE_ABOUT_US; ?></a></li>-->
            <?php if (DEFINE_SITE_MAP_STATUS <= 1) { ?>
            <li><a href="<?php echo zen_href_link(FILENAME_SITE_MAP); ?>"><?php echo HEADER_TITLE_SITE_MAP; ?></a></li>
            <?php } ?>
            <?php if (MODULE_ORDER_TOTAL_GV_STATUS == 'true') { ?>
            <li><a href="<?php echo zen_href_link(FILENAME_GV_FAQ, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_GV_FAQ; ?></a></li>
            <?php } ?>
            <?php if (MODULE_ORDER_TOTAL_COUPON_STATUS == 'true') { ?>
            <li><a href="<?php echo zen_href_link(FILENAME_DISCOUNT_COUPON, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_DISCOUNT_COUPON; ?></a></li>
            <?php } ?>
            <?php if (SHOW_NEWSLETTER_UNSUBSCRIBE_LINK == 'true') { ?>
            <li><a href="<?php echo zen_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_UNSUBSCRIBE; ?></a></li>
            <?php } ?>
            <?php require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?>
            <li><a href="index.php?main_page=reviews">Recent Reviews</a></li>
          </ul>
        </li>          
    </div>
  </div>
</div>
  </tr>
</div> </div><!-- end dropMenuWrapper--> <div class="clearBoth"></div> ``` > > Can anyone see what's causing the annoying phantom drop down in IE7??

Yes, I can see what is causing it. You changed the account section by removing the CONTENTS of the drop down if the person is not logged in, but the drop down is STILL THERE, its just empty. IE still shows a bit of a drop down even though the drop down is empty, because, well, it's IE.

So, to get the function you want change this:

              <li class="submenu"><a class="noLine" href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>
              <ul class="level2">
                <?php if ($_SESSION['customer_id']) { ?>
                <li><a class="noLine" href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
                <li><a class="noLine" href="<?php echo zen_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL'); ?>"><?php echo HEADER_TITLE_NEWSLETTERS; ?></a></li>
                <?php } else { ?>
                <?php } ?>
              </ul>
            </li>

to this:

<?php if ($_SESSION['customer_id']) { ?>
              <li class="submenu"><a class="noLine" href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>
              <ul class="level2">
                <li><a class="noLine" href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
                <li><a class="noLine" href="<?php echo zen_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL'); ?>"><?php echo HEADER_TITLE_NEWSLETTERS; ?></a></li>
              </ul>
            </li>
                <?php } else { ?>
<li><a class="noLine" href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
                <?php } ?>

So NOW, if the customer is not logged in, it will not create a drop down, and if the customer is logged in, it will.

16 Apr 2009, 4:04 PM
#1548
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: CSS Dropdown menu for the header- With Categories!

Thank you, that worked to perfection... really appreciate your time....

Now I'm trying to work out how to make the "sign up / sign in" change back to "My Account" when you're actually logged in?

16 Apr 2009, 4:14 PM
#1549
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: CSS Dropdown menu for the header- With Categories!

Ahh, managed to figure that out quite quickly. I just had to add an extra defines to header.php and call on it below:

<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers                           |
// |                                                                      |
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | [email protected] so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id: tpl_drop_menu.php  2005/06/15 15:39:05 DrByte Exp $
//

?>
<!-- menu area -->

<div id="dropMenuWrapper">
  <div id="dropMenuWrapperb">
    <div id="dropMenuWrapperc">
      <div id="dropMenuWrapperd">
        <div id="dropMenu">
         <ul class="level1">
            <li class="submenu"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo HEADER_TITLE_CATALOG; ?></a>
            </li>
            
            <li><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CONTACT_US; ?></a></li>

            <li><a href="<?php echo zen_href_link(FILENAME_ADVANCED_SEARCH); ?>"><?php echo HEADER_TITLE_SEARCH; ?></a></li>
            
              <?php
 // load the UL-generator class and produce the menu list dynamically from there
 require_once (DIR_WS_CLASSES . 'categories_ul_generator.php');
 $zen_CategoriesUL = new zen_categories_ul_generator;
 $menulist = $zen_CategoriesUL->buildTree(true);
 $menulist = str_replace('"level4"','"level5"',$menulist);
 $menulist = str_replace('"level3"','"level4"',$menulist);
 $menulist = str_replace('"level2"','"level3"',$menulist);
 $menulist = str_replace('"level1"','"level2"',$menulist);
 $menulist = str_replace('<li class="submenu">','<li class="submenu">',$menulist);
 $menulist = str_replace("</li>\n</ul>\n</li>\n</ul>\n","</li>\n</ul>\n",$menulist);
 echo $menulist;
?>
            <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
            <li class="submenu"><a class="noLine" href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>
              <ul class="level2">
                <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
              </ul>
            </li>
            <?php } else { ?>
            <li><a class="noLine" href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
            <?php } ?>
            
              
              <?php if ($_SESSION['customer_id']) { ?>
              <li class="submenu"><a class="noLine" href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT2; ?></a>
              <ul class="level2">
                <li><a class="noLine" href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
                <li><a class="noLine" href="<?php echo zen_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL'); ?>"><?php echo HEADER_TITLE_NEWSLETTERS; ?></a></li>
              </ul>
            </li>
                <?php } else { ?>
             <li><a class="noLine" href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
                <?php } ?>
             </li>

            <li class="submenu"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo HEADER_TITLE_INFORMATION; ?></a>
              <ul class="level2">
			    <?php if (DEFINE_SHIPPINGINFO_STATUS <= 1) { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_SHIPPING); ?>"><?php echo HEADER_TITLE_SHIPPING_INFO; ?></a></li>
				<?php } ?>
			    <?php if (DEFINE_PAYMENTS_STATUS <= 1) { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_PAYMENTS); ?>"><?php echo HEADER_TITLE_PAYMENTS; ?></a></li>
				<?php } ?>
				<?php if (DEFINE_PRIVACY_STATUS <= 1)  { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_PRIVACY); ?>"><?php echo HEADER_TITLE_PRIVACY_POLICY; ?></a></li>
				<?php } ?>
                <!--<li><a href="<?php echo zen_href_link(FILENAME_ABOUT_US); ?>"><?php echo HEADER_TITLE_ABOUT_US; ?></a></li>-->
                <?php if (DEFINE_SITE_MAP_STATUS <= 1) { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_SITE_MAP); ?>"><?php echo HEADER_TITLE_SITE_MAP; ?></a></li>
                <?php } ?>
                <?php if (MODULE_ORDER_TOTAL_GV_STATUS == 'true') { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_GV_FAQ, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_GV_FAQ; ?></a></li>
                <?php } ?>
                <?php if (MODULE_ORDER_TOTAL_COUPON_STATUS == 'true') { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_DISCOUNT_COUPON, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_DISCOUNT_COUPON; ?></a></li>
                <?php } ?>
                <?php if (SHOW_NEWSLETTER_UNSUBSCRIBE_LINK == 'true') { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_UNSUBSCRIBE; ?></a></li>
                <?php } ?>
                <?php require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?>
                <li><a href="index.php?main_page=reviews">Recent Reviews</a></li>
              </ul>
            </li>          
        </div>
      </div>
    </div>
      </tr>
  </div>
</div><!-- end dropMenuWrapper-->
<div class="clearBoth"></div>
18 Apr 2009, 6:58 PM
#1550
lectronix avatar

lectronix

New Zenner

Join Date:
Jun 2008
Posts:
12
Plugin Contributions:
0

Re: CSS Dropdown menu for the header- With Categories!

hi,

I have tried to fix the following prob myself for days but finally giving up now.

on my zencart I have instaled Cherry Zen and I have got the following:

  1. CSS Drop Down Menu
  2. Sidebox CLICKSHOWHIDECATEGORY mod

Now If I try and display both, it messes up the stylesheet and I cant see the clickshowhide sidebox.

Now I know that problem is with CSS DROP DOWN because if i disable CSS DROP DWN then it works fine but then obviously there is no drop down.

I have also noticed that the problem is with "dyamic ul generator" class and if i comment it out, there are no problems.

I have also noticed the same problem with other mods with sidebox.

Any help would be appreciate.

site is http://food2pakistan.com and I have disabled the sidebox of clickshowhide for the site to work correctly until i resolve this issue.

19 Apr 2009, 5:44 PM
#1551
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: CSS Dropdown menu for the header- With Categories!

Lectronix:

hi,

I have tried to fix the following prob myself for days but finally giving up now.

on my zencart I have instaled Cherry Zen and I have got the following:

  1. CSS Drop Down Menu
  2. Sidebox CLICKSHOWHIDECATEGORY mod

Now If I try and display both, it messes up the stylesheet and I cant see the clickshowhide sidebox.

Now I know that problem is with CSS DROP DOWN because if i disable CSS DROP DWN then it works fine but then obviously there is no drop down.

I have also noticed that the problem is with "dyamic ul generator" class and if i comment it out, there are no problems.

I have also noticed the same problem with other mods with sidebox.

Any help would be appreciate.

site is http://food2pakistan.com and I have disabled the sidebox of clickshowhide for the site to work correctly until i resolve this issue.

I can't help you if I can't see the problem in action.

I do see that you are missing two closing </div>'s. You somehow deleted two closing </div>'s from includes/templates/YOUR_TEMPLATE/common/tpl_header.php. Reupload the original of that file.

That could be your problem. Just because removing css drop down makes things better, doesn't mean there is a problem with it.

20 Apr 2009, 6:37 PM
#1552
lectronix avatar

lectronix

New Zenner

Join Date:
Jun 2008
Posts:
12
Plugin Contributions:
0

Re: CSS Dropdown menu for the header- With Categories!

hi thanks for replying. I have now enabled the sidebox so please have a look. I have also uploaded the original tpl_header.php

I am using the following to insert the drop dwn, right after categories tabs display (which I have commented out but even if i dont, the problem is there):

<!--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-->
21 Apr 2009, 12:16 AM
#1553
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: CSS Dropdown menu for the header- With Categories!

Lectronix:

hi thanks for replying. I have now enabled the sidebox so please have a look. I have also uploaded the original tpl_header.php

I am using the following to insert the drop dwn, right after categories tabs display (which I have commented out but even if i dont, the problem is there):

<!--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-->

Your site is still generating errors.

I think part of your problem is your code here:

<!--// bof: search //-->

and

<!--// eof: search //-->

The correct syntax for hidden text would be like this: (get rid of the //'s).

<!-- bof search -->

and

<!-- eof search -->
21 Apr 2009, 11:46 AM
#1554
lectronix avatar

lectronix

New Zenner

Join Date:
Jun 2008
Posts:
12
Plugin Contributions:
0

Re: CSS Dropdown menu for the header- With Categories!

jettrue:

Your site is still generating errors.

I think part of your problem is your code here:

<!--// bof: search //-->

and

<!--// eof: search //-->

The correct syntax for hidden text would be like this: (get rid of the //'s).

<!-- bof search -->

and

<!-- eof search -->

I couldnt find the <!--// bof: search //--> etc in search sidebox so I turned it off but its the same. Also all other sideboxes disappear like normal category sidebox, whats new sidebox, currency sidebox on right column etc

21 Apr 2009, 11:56 AM
#1555
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: CSS Dropdown menu for the header- With Categories!

Lectronix:

I couldnt find the <!--// bof: search //--> etc in search sidebox so I turned it off but its the same. Also all other sideboxes disappear like normal category sidebox, whats new sidebox, currency sidebox on right column etc

You have a lot of things going on on your site.

Now you have this (remove the extra -->)

<!--eof-optional categories tabs navigation display-->-->

Did you turn on a new sidebox? Something (it seems like a sidebox) is stopping the site from finishing loading. Turn off sideboxes one by one until the site comes back.

To find what file this is in:

<!--// bof: search //-->

You can search for it in your admin, under "Tools", "Developers Tool Kit", use the bottom search box, and choose "Search Catalog".

21 Apr 2009, 12:34 PM
#1556
lectronix avatar

lectronix

New Zenner

Join Date:
Jun 2008
Posts:
12
Plugin Contributions:
0

Re: CSS Dropdown menu for the header- With Categories!

Yes thats the problem i installed "click show hide category" mod and if i switch the sidebox on site goes like how u can see it now. I turned off all sideboxes except the mode sidebox, site still the same

Tried searching <!--// bof: search //--> using the developer kit before and again just now... the very last search box and selected catalog .. it cant find the file

21 Apr 2009, 1:08 PM
#1557
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: CSS Dropdown menu for the header- With Categories!

Lectronix:

Yes thats the problem i installed "click show hide category" mod and if i switch the sidebox on site goes like how u can see it now. I turned off all sideboxes except the mode sidebox, site still the same

Tried searching <!--// bof: search //--> using the developer kit before and again just now... the very last search box and selected catalog .. it cant find the file

Then there is something wrong with click show hide. Try reinstalling it.

21 Apr 2009, 1:23 PM
#1558
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: CSS Dropdown menu for the header- With Categories!

Lectronix:

Yes thats the problem i installed "click show hide category" mod and if i switch the sidebox on site goes like how u can see it now. I turned off all sideboxes except the mode sidebox, site still the same

Tried searching <!--// bof: search //--> using the developer kit before and again just now... the very last search box and selected catalog .. it cant find the file

Ok, I just downloaded the click show hide. The issue is it also uses a file named includes/classes/categories_ul_generator.php

Change the one for "click show hide" to categories_ul_generator2.php
Then in includes/modules/sideboxes/YOUR_TEMPLATE/categories_css.php, change categories_ul_generator.php to categories_ul_generator2.php

21 Apr 2009, 1:51 PM
#1559
lectronix avatar

lectronix

New Zenner

Join Date:
Jun 2008
Posts:
12
Plugin Contributions:
0

Re: CSS Dropdown menu for the header- With Categories!

jettrue:

Ok, I just downloaded the click show hide. The issue is it also uses a file named includes/classes/categories_ul_generator.php

Change the one for "click show hide" to categories_ul_generator2.php
Then in includes/modules/sideboxes/YOUR_TEMPLATE/categories_css.php, change categories_ul_generator.php to categories_ul_generator2.php

yes i know so I left the original clickshowhide ul generator and renamed the drop down menu file to categories_ul_generator1.php and made changes to tpl_drop_menu.php.

clickshowhide works absolutely fine if drop dwn menu's category menu is turned off

21 Apr 2009, 5:50 PM
#1560
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: CSS Dropdown menu for the header- With Categories!

Lectronix:

yes i know so I left the original clickshowhide ul generator and renamed the drop down menu file to categories_ul_generator1.php and made changes to tpl_drop_menu.php.

clickshowhide works absolutely fine if drop dwn menu's category menu is turned off

I think you'll have to change the name of the function inside categories_ul_generator1.php (add a 1 after every function - but I think you can skip buildBranch and buildTree?), like so:

class zen_categories_ul_generator**1** {
var $root_category_id = 0,
$max_level = 0,
$data = array(),
$parent_group_start_string = '<ul%s>',
$parent_group_end_string = '</ul>',
$child_start_string = '<li%s>',
$child_end_string = '</li>',
$spacer_string = '
',
$spacer_multiplier = 1;

var $document_types_list = ' (3) ';
// acceptable format example: ' (3, 4, 9, 22, 18) '

function zen_categories_ul_generator**1**($load_from_database = true)
{
    global $languages_id, $db;
    $this->data = array();
    $categories_query = "select c.categories_id, cd.categories_name, c.parent_id
									from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
									where c.categories_id = cd.categories_id
									and c.categories_status=1 " .
    								" and cd.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
    								" order by c.parent_id, c.sort_order, cd.categories_name";
    $categories = $db->Execute($categories_query);
    while (!$categories->EOF) {
        $this->data[$categories->fields['parent_id']][$categories->fields['categories_id']] = array('name' => $categories->fields['categories_name'], 'count' => 0);
        $categories->MoveNext();
    }
}

function buildBranch($parent_id, $level, $submenu=true, $parent_link='')
{
    $result = sprintf($this->parent_group_start_string, ($submenu==true) ? ' class="level'. ($level+1) . '"' : '' );
    
    if (($this->data[$parent_id])) {
        foreach($this->data[$parent_id] as $category_id => $category) {
            $category_link = $parent_link . $category_id;
            if (($this->data[$category_id])) {
                $result .= sprintf($this->child_start_string, ($submenu==true) ? ' class="submenu"' : '');
            } else {
                $result .= sprintf($this->child_start_string, '');
            }
            $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * 1) . '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link) . '">';
            $result .= $category['name'];
            $result .= '</a>';
			  
            if (($this->data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level+1))) {
                $result .= $this->buildBranch($category_id, $level+1, $submenu, $category_link . '_');
            }
            $result .= $this->child_end_string;
        }
    }
    
    $result .= $this->parent_group_end_string;
    return $result;
}

function buildTree($submenu=false)
{
    return $this->buildBranch($this->root_category_id, '', $submenu);
}

}
?>