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

Results 781 to 800 of 2,344
25 Jan 2008, 11:00 PM
#781
jettrue avatar

jettrue

Totally Zenned

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

CSS Dropdown menu for the header- With Categories!

marksu:

Well never mind.

I made the changes my self it was mutch simpler than I thought.

Not sure if anyone care as not mutch communication hre but if somebody need solution here it is.

It is based on my earlier design which enables to add ezpaged filtering which groups they belong.

It would be even better code if it could outomatically check if multi languge expages module is installed instead of using comments character. Wen I dont know how to do it so this will do.

// --------------------

If ($chapNumber != ""){

// USE THIS IS MULTI-LANGUGE EZPAGES MODULE NOT INSTALLED
// $page_query = $db->Execute("select * from " . TABLE_EZPAGES . " where toc_chapter = " . $chapNumber . " and status_header = 1 order by header_sort_order, pages_title");

// USE THIS IS MULTI-LANGUGE EZPAGES MODULE IS INSTALLED
// query modified for multi-language support
$page_query = $db->Execute("select e.pages_id, e.page_open_new_window, e.page_is_ssl, e.alt_url, e.alt_url_external, et.pages_title
from " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
where toc_chapter = " . $chapNumber . " and e.pages_id = et.pages_id
and et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
and status_header = 1
and header_sort_order > 0
order by header_sort_order, pages_title");
// end of modification

} else

{
// USE THIS IS MULTI-LANGUGE EZPAGES MODULE NOT INSTALLED
$page_query = $db->Execute("select * from " . TABLE_EZPAGES . " where status_header = 1 order by header_sort_order, pages_title");

// USE THIS IS MULTI-LANGUGE EZPAGES MODULE IS INSTALLED
// query modified for multi-language support
$page_query = $db->Execute("select e.pages_id, e.page_open_new_window, e.page_is_ssl, e.alt_url, e.alt_url_external, et.pages_title
from " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
where e.pages_id = et.pages_id
and et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
and status_header = 1
and header_sort_order > 0
order by header_sort_order, pages_title");
// end of modification
}
// --------------------

marksu

Glad you figured it out, I don't have the time to make sure every module is compatible with this template, but perhaps I'll add this to future designs.

26 Jan 2008, 3:53 PM
#782
marksu avatar

marksu

Zen Follower

Join Date:
Nov 2007
Posts:
260
Plugin Contributions:
0

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

jettrue:

Glad you figured it out, I don't have the time to make sure every module is compatible with this template, but perhaps I'll add this to future designs.

Yes I understand. That is why I was happy to give contribution by providing the code.

Thank you for nice mod.

marksu

27 Jan 2008, 3:48 AM
#783
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

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

jettrue,
Just noticed an interesting effect in my drop down menu. The last item in the bar is "MyAccount" and includes: Log In, Create Account, Shopping Cart, Shipping Info, Discount Coupons and Newsletter Unsubscribe. If I add a product to the shopping cart, the last 3 items disappear from the menu.
Is this normal ZenCart behaviour or something I need to fix with the menu?

Maury

27 Jan 2008, 4:55 PM
#784
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!

mauryg:

jettrue,
Just noticed an interesting effect in my drop down menu. The last item in the bar is "MyAccount" and includes: Log In, Create Account, Shopping Cart, Shipping Info, Discount Coupons and Newsletter Unsubscribe. If I add a product to the shopping cart, the last 3 items disappear from the menu.
Is this normal ZenCart behaviour or something I need to fix with the menu?

Maury

It looks like something you need to fix. You added the Shipping Info, Discount Coupons and Newsletter Unsubscribe yourself, right? I'm assuming you need to fix it somehow. Could you post that section of includes/templates/YOUR_TEMPLATE/common/tpl_drop_menu.php?

27 Jan 2008, 9:59 PM
#785
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

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

Jade,
You are correct. Looks like I was not paying attention to all the "if...else" clauses in that section of the menu. I think I can handle this ...I just have to replicate the statements I need in the menu in the different sub-parts.
We are just going live with this shop. It is based on your SimpleZen template with the Drop Down Menu added. I'll PM you the link when it's ready. I would love to have your critique of the site.

Maury

27 Jan 2008, 11:40 PM
#786
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

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

Jade,
I managed to get it 98% fixed. The result is usable, but not what I really wanted. Here is the last section of the menu code that now produces a more desirable result:

<li class="submenu"><a 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 href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li> <?php } else { ?> <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li> <li><a href="<?php echo zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CREATE_ACCOUNT; ?></a></li> <?php } ?> <?php if ($_SESSION['cart']->count_contents() != 0) { ?> <li class="submenu"><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> <ul class="level3"> <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 href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li> <?php } ?> <li><a href="<?php echo zen_href_link(FILENAME_SHIPPING); ?>"><?php echo HEADER_TITLE_SHIPPING_INFO; ?></a></li> <?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 } ?> <li><a href="<?php echo zen_href_link(FILENAME_DISCOUNT_COUPON, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_DISCOUNT_COUPON; ?></a></li>
      <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL'); ?>"><?php echo HEADER_TITLE_NEWSLETTERS; ?></a></li>
      </ul>
</li>
</ul>

What I would really like in the last <li> item is IF the customer is logged in (so we know who it is) and IS already subscribed to the newsletter, then show the "UNSUBSCRIBE" link, ELSE show the general "NEWSLETTERS" link. If I can't do that then I will change the text in the newsletters form area to say something like "If you are already subscribed to our newsletter and wish to UNSUBSCRIBE, uncheck the box and click UPDATE".
BTW I understand that if I send out an HTML newsletter it automatically appends an unsubscibe link at the bottom. Do I have to have the Admin>Configuration>E-mail Options>Display "Newsletter Unsubscribe" Link? set to 'true' for this to happen AND to receive the customer's request from the link?

28 Jan 2008, 1:22 PM
#787
imak avatar

imak

New Zenner

Join Date:
Feb 2007
Posts:
24
Plugin Contributions:
0

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

It is possible to make the menus first level non-proportional (%), with differents widths, adapted to the width of the words ? With 5px padding left and right sides of the words ?

( sorry for my english. I hope my question is clear )

29 Jan 2008, 2:57 AM
#788
illum avatar

illum

New Zenner

Join Date:
Jan 2008
Posts:
25
Plugin Contributions:
0

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

I am having issues with this addon. I installed to spec and my menu and everything below it is not loading all the way.

Link to site: http://www.godlikeprinting.com/printshop

Anyone know what the issue is?

29 Jan 2008, 9:34 AM
#789
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

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

Looks fine in Firefox!!

Try adjusting:

width:16.667%;

down a little.

Craig

29 Jan 2008, 10:37 PM
#790
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!

mauryg:

Jade,
I managed to get it 98% fixed. The result is usable, but not what I really wanted. Here is the last section of the menu code that now produces a more desirable result:

What I would really like in the last <li> item is IF the customer is logged in (so we know who it is) and IS already subscribed to the newsletter, then show the "UNSUBSCRIBE" link, ELSE show the general "NEWSLETTERS" link. If I can't do that then I will change the text in the newsletters form area to say something like "If you are already subscribed to our newsletter and wish to UNSUBSCRIBE, uncheck the box and click UPDATE".
BTW I understand that if I send out an HTML newsletter it automatically appends an unsubscibe link at the bottom. Do I have to have the Admin>Configuration>E-mail Options>Display "Newsletter Unsubscribe" Link? set to 'true' for this to happen AND to receive the customer's request from the link?

I don't think you can do what you're asking (see who it is and know if they are subscribed or unsubscribed).

The newsletter unsubscribe link takes them to the same page (where they have to check a box to unsubscribe).

29 Jan 2008, 10:51 PM
#791
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!

imak:

It is possible to make the menus first level non-proportional (%), with differents widths, adapted to the width of the words ? With 5px padding left and right sides of the words ?

( sorry for my english. I hope my question is clear )

Yes... that is how the menu used to be... until too many people were asking for it this way, LOL.

Open up includes/templates/YOUR_TEMPLATE/css/stylesheet_headermenu.css, and remove from div#dropMenu li:

width:16.667%;
*width:16.649%;

and then change the padding for div#dropMenu li a from:

padding: .6em 0; 

to:

padding: .6em 2em; 
30 Jan 2008, 12:39 AM
#792
illum avatar

illum

New Zenner

Join Date:
Jan 2008
Posts:
25
Plugin Contributions:
0

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

illum:

I am having issues with this addon. I installed to spec and my menu and everything below it is not loading all the way.

Link to site: http://www.godlikeprinting.com/printshop

Anyone know what the issue is?

Sorry fixed that issue, it was because I didn't rename all the YOUR_TEMPLATE directories

30 Jan 2008, 5:42 AM
#793
imak avatar

imak

New Zenner

Join Date:
Feb 2007
Posts:
24
Plugin Contributions:
0

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

jettrue:

Yes... that is how the menu used to be... until too many people were asking for it this way, LOL.

Open up includes/templates/YOUR_TEMPLATE/css/stylesheet_headermenu.css, and remove from div#dropMenu li:

width:16.667%;
*width:16.649%;

> 
> ```
padding: .6em 0; 
```to:
> ```
padding: .6em 2em; 

Thanks. But I have already tried and it's not displayed correctly in IE 6.
See the jpg attached.
Other solution ?

30 Jan 2008, 1:51 PM
#794
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!

imak:

Thanks. But I have already tried and it's not displayed correctly in IE 6.
See the jpg attached.
Other solution ?

remove this from stylesheet_header_menu.css:

  /* Hides from IE5-mac \*/
	height: 1%;
	/* End hide from IE5-mac */ 
3 Feb 2008, 9:17 AM
#795
cushietushies avatar

cushietushies

New Zenner

Join Date:
Jun 2006
Posts:
35
Plugin Contributions:
0

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

hi I love your CSS drop down box, but I was looking for customize the category section so it just displayed the 1st category where catagories is. As we only have one product type but many sub catagories in it.

Now I could change it so each product is a different catagory but i'd rather change the display code for this.

Now I've checked the code and its during the build branches it does this, I tried to break it down further to come up with an elegant hack, but nothign would work.

I was hoping you could help me out at all?

Thanks for your work!

On a side note I'd also like to know is there a way to show the output from a function other than just echo, exit? As with html it not very visible... (I guess I could check source that's displayed...

I'm a c++ coder so php and the like is somewhat foreign to me...

thanks
chris

4 Feb 2008, 4:52 AM
#796
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!

cushietushies:

hi I love your CSS drop down box, but I was looking for customize the category section so it just displayed the 1st category where catagories is. As we only have one product type but many sub catagories in it.

Now I could change it so each product is a different catagory but i'd rather change the display code for this.

Now I've checked the code and its during the build branches it does this, I tried to break it down further to come up with an elegant hack, but nothign would work.

I was hoping you could help me out at all?

Thanks for your work!

On a side note I'd also like to know is there a way to show the output from a function other than just echo, exit? As with html it not very visible... (I guess I could check source that's displayed...

I'm a c++ coder so php and the like is somewhat foreign to me...

thanks
chris
I'm not really following what you are trying to do. If you want to limit how deep the menu goes, adjust the $max_level in includes/classes/categories_ul_generator.php

4 Feb 2008, 5:06 AM
#797
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

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

cushietushies:

hi I love your CSS drop down box, but I was looking for customize the category section so it just displayed the 1st category where catagories is. As we only have one product type but many sub categories in it...
thanks
chris
Chris,
If you really only have, and will only ever have, one category, it doesn't make sense to use sub-categories. Convert them all to categories and the menu will be a lot simpler.
I had a number of categories, one with many subcategories and the drop down menu became so long that you couldn't reach the bottom of the menu unless you had a wheel mouse, If you left the menu to use the scroll bar at the side of the page, the menu would retract. This was especially bad for viewers with lower resolution screens. I ended up just putting the main categories in the drop down and then putting subcategory links on the category page.

5 Feb 2008, 9:37 PM
#798
dt99rrc avatar

dt99rrc

New Zenner

Join Date:
Nov 2007
Posts:
4
Plugin Contributions:
0

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

Hi Probably being completely thick but I can't seem to get ride of the categories above my drop down menus... I assume that its completely obvious, but can anyone point be in the right direction pls??

Thanks

Rupert

https://www.yourwashbag.com

6 Feb 2008, 9:25 AM
#799
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

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

In admin:
Configuration > Layout Settings > Categories-Tabs Menu ON/OFF

Craig

6 Feb 2008, 9:39 AM
#800
dt99rrc avatar

dt99rrc

New Zenner

Join Date:
Nov 2007
Posts:
4
Plugin Contributions:
0

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

Thank you! Much appreciated!

I thought it would be an easy one!