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,610

Results 1,241 to 1,260 of 2,344
18 Oct 2008, 6:26 PM
#1241
jgg1974 avatar

jgg1974

New Zenner

Join Date:
Apr 2008
Posts:
48
Plugin Contributions:
0

CSS Dropdown menu for the header- With Categories!

jgg1974:

Hello, Love the hard work put into this mod for all of us !! Just wondering , and went through a lot of this post, but i must of missed this ..

Can you tell me how to change the home link? I would like when you click on home, it takes me to my original homepage and not the catalog home page. So in essence, I would like when someone clicks on home, it takes them to https://www.jygoods.com

Thanks a lot !!!! :D

ANY IDeas???:blink:

18 Oct 2008, 10:46 PM
#1242
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!

petronew:

I am really challenged by the Fly Out Menu. I need some help. As it is now, all the high level categories are veritically under 1 tab called categores.

What i need is help on taking this Addon Fly Out Menu and make it work so that each first level category is a separate menu tab.

Can anyone help me with this?

Thanks

Download the one beneath mine in the download section called "Paul's Edition".

18 Oct 2008, 10:48 PM
#1243
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!

jgg1974:

ANY IDeas???:blink:

Sure. Easy Peasy. Open up includes/templates/YOUR_TEMPLATE/common/tpl_drop_menu.php and change this:

<li class="submenu"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo HEADER_TITLE_CATALOG; ?></a>

to this:

<li class="submenu"><a href="http://www.jygoods.com"><?php echo HEADER_TITLE_CATALOG; ?></a>
20 Oct 2008, 3:52 AM
#1244
jgg1974 avatar

jgg1974

New Zenner

Join Date:
Apr 2008
Posts:
48
Plugin Contributions:
0

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

jettrue:

Sure. Easy Peasy. Open up includes/templates/YOUR_TEMPLATE/common/tpl_drop_menu.php and change this:

<li class="submenu"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo HEADER_TITLE_CATALOG; ?></a> ``` > > to this: > > ``` <li class="submenu"><a href="http://www.jygoods.com"><?php echo HEADER_TITLE_CATALOG; ?></a> ```

:clap:
Sure was Easy Peasy.. Thank you very much!!!!!

20 Oct 2008, 6:47 PM
#1245
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

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

Hi jettrue how would you go about slowing down the speed of the menu. Mine is to fast. Thank you

20 Oct 2008, 8:15 PM
#1246
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!

countrycharm:

Hi jettrue how would you go about slowing down the speed of the menu. Mine is to fast. Thank you

There's no speed setting, this is a css menu.

20 Oct 2008, 10:49 PM
#1247
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

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

Oh Ok thank you for your answer. I was just wondering because you have to be fast at what your doing or you slip off the categories in a hurry...lol

20 Oct 2008, 10:54 PM
#1248
nosleephotel avatar

nosleephotel

New Zenner

Join Date:
Sep 2008
Location:
Los Angeles, CA
Posts:
67
Plugin Contributions:
0

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

countrycharm,

Sounds like you have some spacing between your top bar and the drop down menu. I've had that before and would have to move the mouse quickly to keep the dropdown. So the solution is to get rid of the padding or margin that is keeping your top bar and the dropdown from being flush.

21 Oct 2008, 3:28 AM
#1249
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

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

Thanks for you help. How would I go about doing that? Would it be in the css file. I worked on this a while back when I first installed it but I don't remember what I did ....lol. Any help would be appreciated. Thank you.

21 Oct 2008, 5:18 AM
#1250
nosleephotel avatar

nosleephotel

New Zenner

Join Date:
Sep 2008
Location:
Los Angeles, CA
Posts:
67
Plugin Contributions:
0

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

I would recommend grabbing the original stylesheet_header_menu.css and starting over or at least comparing it with your modified version. Do you have a link to the site so we can see it?

21 Oct 2008, 10:10 AM
#1251
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!

countrycharm:

Thanks for you help. How would I go about doing that? Would it be in the css file. I worked on this a while back when I first installed it but I don't remember what I did ....lol. Any help would be appreciated. Thank you.

If you're talking about the Good Shepherd site in your sig., there's no gap in your menu, and there's no way to slow it down, unfortunately. You would need a javascript menu for that.

22 Oct 2008, 8:08 AM
#1252
ajhb avatar

ajhb

New Zenner

Join Date:
Jul 2008
Posts:
59
Plugin Contributions:
0

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

Help! I've added some menu items to the main menu bar, but can't seem to get the new dropdowns to work in firefox (2.0.0.17) - it works fine in IE (7.0). The original dropdowns work fine in both.

Code as follows...

 <li class="submenu"><a ="<?php echo zen_href_link(FILENAME_ABOUT_CHOCOLATE); ?>"><?php echo HEADER_TITLE_ABOUT_CHOCOLATE; ?></a>
            </li>
			 <ul class="level2">
                <li><a href="<?php echo zen_href_link(FILENAME_SHIPPING); ?>"><?php echo HEADER_TITLE_SHIPPING_INFO; ?></a></li>
			</ul>	
			<li class="submenu"><a href="<?php echo zen_href_link(FILENAME_ABOUT_US); ?>"><?php echo HEADER_TITLE_ABOUT_US; ?></a>
            </li>	

				
            <li class="submenu"><a ="<?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 } ?>

So, you can see the menu as follows
About Chocolate : About Us : FAQs

The dropdown for the FAQs works fine so I pasted the shipping dropdown code to also show in About Chocolate as a test. Works fine in IE, but nothing in Firefox. Anyone have any idea why, it's driving me crazy.

Sorry there is no link, only working on hone dev machine at the moment.

Thanks,
Adam.

22 Oct 2008, 7:38 PM
#1253
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

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

Thank jettrue for looking at my site. One more question for you. I have ask you this before I believe. In IE7 when you mouse over home, the menu bar shifts to the left and you can see a long white space on the right of the menu bar. In FF and Safari you don't see this. Thank you for your help.

23 Oct 2008, 4:02 AM
#1254
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

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

This has the potential to be a really nice and extremely useful mod once it has been finished.

At the moment, once installed, you end up with one category that has no header (and no, it is not possible to add one - it simply won't display), Categories, Information, Contact Us categories, and two categories that contain nothing, have no titles and which also cannot be removed or modified.

Then there is that thing in the readme about a hidden link for an "About Us" page - WTF? - Surely the whole idea of this module is to enable you to add stuff like that by configuring the files or adding in your existing EZPages links? And why the need for for this hidden link anyway?

Well, I'm going back to EZPages - they don't do what I need them to do, but this module as it is is hopeless, and cannot be configured either. - The PHP template is shot and the coding appears to be broken.

One other thing, the code for manual inclusion into the tpl_header.php needs to go before

<div id="navSuppWrapper">
<div id="navSupp">

or the dropdown bar will not display.

23 Oct 2008, 4:15 AM
#1255
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

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

Well, I've discovered that the first blank title box is supposed to be a homepage link, whilst the other two blanks are for linking account login / details and for viewing the shopping cart.

...but no much good if you cannot modify the number of boxes or get the titles to display...

This problem affects both Firefox and IE, ie: it is not peculiar to a particular browser.

23 Oct 2008, 4:47 AM
#1256
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

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

This is the code with the 'blank' boxes stripped out for anyone with that problem:

<?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_SITE_MAP); ?>"><?php echo HEADER_TITLE_CATEGORIES; ?></a>
              <?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;
?>
            </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_PRIVACY_STATUS <= 1)  { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_PRIVACY); ?>"><?php echo HEADER_TITLE_PRIVACY_POLICY; ?></a></li>
				<?php } ?>
				<?php if (DEFINE_CONDITIONS_STATUS <= 1) { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_CONDITIONS); ?>"><?php echo HEADER_TITLE_CONDITIONS_OF_USE; ?></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'); ?>
              </ul>
            </li>
            <li><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CONTACT_US; ?></a></li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</div><!-- end dropMenuWrapper-->
<div class="clearBoth"></div>

If I can get some revised account and shopping cart links displaying properly I will add them, too, in a new post because is now looking as though this module may be useable after all following the modifications.

23 Oct 2008, 6:13 AM
#1257
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

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

Once the blank category titles, and menus, have been removed this module works well, and integrates the EZ Pages links well, too.

The seperate About Us module can be used to create your own pages - very useful! - but the pages cannot be integrated within the dropdown menu, as there is no way to link them into it and the usual PHP linkage methods won't work with it for some reason.

So even with the blank categories removed you are still completely stuck as far as customising the drop-down menu is concerned... - you will be able to add the top, category, names but nothing underneath them.

23 Oct 2008, 6:34 AM
#1258
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

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

...although the integrated EZ Page links work fine for any added pages - strange - and a shame that they will not appear under any other category than Information, otherwise it would be possible to force the dropdown menus to display properly using the EZPages module.

23 Oct 2008, 6:51 AM
#1259
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

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

The links are working... in IE7 and not Firefox.

I've also got duplicate links, with some that work and others that try to link to

http://www.myzenstore.co.uk/index.php?main_page=FILENAME_ACCESS

...so it seems there is some kind of display problem with Firefox and a problem with the links...

23 Oct 2008, 7:14 AM
#1260
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

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

IE7 is also refusing (even after clearing the cache) to display the title names properly, displaying instead

https://www.myzenstore.co.uk/index.php?main_page=FILENAME_ORDER_DETAILS">Order Details 

The modified code in the template file for the dropdown menu now looks like this

<?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_SITE_MAP); ?>"><?php echo HEADER_TITLE_CATEGORIES; ?></a>
              <?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;
?>
            </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 require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?>
              </ul>
            </li>
            <li class="submenu"><?php echo zen_href_link(FILENAME_ORDER_DETAILS, '', 'SSL'); ?>"><?php echo HEADER_TITLE_ORDER_DETAILS; ?></li>
              <ul class="level2">
			    <?php if (DEFINE_ACCESS_STATUS <= 1) { ?>
                <li><a href="<?php echo zen_href_link(FILENAME_ACCESS); ?>"><?php echo HEADER_TITLE_ACCESS; ?></a></li>
				<?php } ?>
                <?php require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?>
              </ul>
            <li><a href="<?php echo zen_href_link(FILENAME_ALL_ABOUT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_ALL_ABOUT; ?></a></li>
            <li><a href="<?php echo zen_href_link(FILENAME_PURCHASE_LIST, '', 'SSL'); ?>"><?php echo HEADER_TITLE_PURCHASE_LIST; ?></a></li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</div><!-- end dropMenuWrapper-->
<div class="clearBoth"></div>

The references to ACCESS are references for the custom file I added... and which can be accessed by or through everything perfectly OK... except the drop-down menu...