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 541 to 560 of 2,344
16 Oct 2007, 7:19 PM
#541
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

CSS Dropdown menu for the header- With Categories!

I have some question about remove some thing with CSS Dropdown menu. I attched file in this post about my means.

How to do that?

KIMSON

Thanks you!

16 Oct 2007, 8:51 PM
#542
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!

kimsonvu:

I have some question about remove some thing with CSS Dropdown menu. I attched file in this post about my means.

How to do that?

KIMSON

Thanks you!

The blue links below the drop down menu is the EZ Pages Header section. You turn that off in your admin, under "Configuration", "EzPages Settings".

As for removing the HOME and CATEGORIES drop down menu portion, open up includes/templates/YOUR_TEMPLATE/common/tpl_drop_menu.php and remove this section:

<li class="submenu"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo HEADER_TITLE_CATALOG; ?></a>
              <ul class="level2">
                <li><a href="<?php echo zen_href_link(FILENAME_PRODUCTS_NEW); ?>"><?php echo HEADER_TITLE_NEW_PRODUCTS; ?></a></li>
                <li><a href="<?php echo zen_href_link(FILENAME_PRODUCTS_ALL); ?>"><?php echo HEADER_TITLE_ALL_PRODUCTS; ?></a></li>
                <li><a href="<?php echo zen_href_link(FILENAME_SPECIALS); ?>"><?php echo HEADER_TITLE_SPECIALS; ?></a></li>
                <li><a href="<?php echo zen_href_link(FILENAME_ADVANCED_SEARCH); ?>"><?php echo HEADER_TITLE_SEARCH; ?></a></li>
              </ul>
            </li>
            <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>

Since you now only have 4 drop down menu sections, instead of six, you'll need to open includes/templates/YOUR_TEMPLATE/css/stylesheet_header_menu.css and change the 16.667% to 25%.

17 Oct 2007, 4:28 AM
#543
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

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

Thanks you very much!

I can remove home and categories menu now!But i can not remove ezpage in admin->config->ezpage setting ->0

After that, i see screen like image which i include in this post.

Since you now only have 4 drop down menu sections, instead of six, you'll need to open includes/templates/YOUR_TEMPLATE/css/stylesheet_header_menu.css and change the 16.667% to 25%.

I change this but i do not see any different !? I make some thing wrong?

17 Oct 2007, 11:06 AM
#544
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!

kimsonvu:

Thanks you very much!

I can remove home and categories menu now!But i can not remove ezpage in admin->config->ezpage setting ->0

After that, i see screen like image which i include in this post.

I change this but i do not see any different !? I make some thing wrong?

Could I see an actual site link please? You can PM it to me if you'd like to keep it private. Also, open up includes/template/YOUR_TEMPLATE/common/tpl_drop_menu.php, and at the very end add this:

<div class="clearBoth"></div>
17 Oct 2007, 11:34 AM
#545
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

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

jettrue:

Could I see an actual site link please? You can PM it to me if you'd like to keep it private. Also, open up includes/template/YOUR_TEMPLATE/common/tpl_drop_menu.php, and at the very end add this:

<div class="clearBoth"></div>

Hi,

I just send an email for you via zencart forums.

Also,this is my website:

https://www.handicraft-vn.com

17 Oct 2007, 2:42 PM
#546
twdhosting avatar

twdhosting

Zen Follower

Join Date:
Mar 2005
Posts:
119
Plugin Contributions:
0

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

Is it possible to put different categories as "parent" items in the drop down menu????

What I mean is - imagine this...

I have 10 main categories with products under each one that i want to drop down normally (just as the drop down mod intended) BUT I also have a couple of categories that contain sub-categories and I want these to appear seperately in the header.

So I will have <HOME> <PRODUCTS> <Category 15> <Category 30>

So that Category 15 and category 30 still drop down their sub-categories..

I hope I am making sense!

I could hard code the categories (in fact I have started that way) using main_page=index&cPath=119 for example but this will take a while and would not allow easy modification in the future...

Thanks in advance

Tony

17 Oct 2007, 4:01 PM
#547
datinbridal avatar

datinbridal

New Zenner

Join Date:
Oct 2007
Posts:
25
Plugin Contributions:
0

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

Hello

First off, I like to say I love this menu, it looks great in Firefox. I'd like to know how I get it to work in IE. In IE the menu drops down put it the text on the screen shows through and I am unable to click on the menu items.

Is there a fix for this?

Thank you very much,
Dave
http://datinbridal.com

17 Oct 2007, 5:16 PM
#548
davidandrews avatar

davidandrews

Zen Follower

Join Date:
Apr 2006
Posts:
108
Plugin Contributions:
0

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

HI There
I have been playing with this menu and LOVE IT!!

I have it working in Firefox and can resize the browser and it fits whatever size the browser is

in IE, at full screen, it kerns the "shopping cart" link onto another line.

if I adjust the window it will bring it onto the same line as the other main menu items, but kerns onto another line at full screen size

Is there a workaround?

Thanks Loads

Samantha

Ps - do you accept donations?

17 Oct 2007, 6:30 PM
#549
fcegarra avatar

fcegarra

New Zenner

Join Date:
Jul 2007
Posts:
61
Plugin Contributions:
0

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

Sorry I think it is the wrong place......

Hello everyone,

I read a lot of the posts about the breadcrumb problems and the flyout categories but I can not fix my problem.
I can not see the parent caetgory when I click on a sub category.
For exemple, I should see :
Home > Jewelry > Necklaces when I click on the sub-category 'necklaces' but I SEE just Home > Necklaces

You can check it out here : http://www.viamarisnyc.com/zen/index.php?main_page=index&cPath=23

If you have any idea, don't hesitate, I am getting crazyy!!

thanks a lot

Francois

17 Oct 2007, 7:01 PM
#550
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

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

fcegarra:

Sorry I think it is the wrong place......

Hello everyone,

I read a lot of the posts about the breadcrumb problems and the flyout categories but I can not fix my problem.
I can not see the parent caetgory when I click on a sub category.
For exemple, I should see :
Home > Jewelry > Necklaces when I click on the sub-category 'necklaces' but I SEE just Home > Necklaces

You can check it out here : http://www.viamarisnyc.com/zen/index.php?main_page=index&cPath=23

If you have any idea, don't hesitate, I am getting crazyy!!

thanks a lot

Francois

Hello, i see some of your jewelry is made of horn!My company is manufacturer of this product line.

About CSS dropdown menu - can anyone tell me how to remove ezpage header in Admin- > config?

17 Oct 2007, 8:51 PM
#551
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!

twdhosting:

Is it possible to put different categories as "parent" items in the drop down menu????

What I mean is - imagine this...

I have 10 main categories with products under each one that i want to drop down normally (just as the drop down mod intended) BUT I also have a couple of categories that contain sub-categories and I want these to appear seperately in the header.

So I will have <HOME> <PRODUCTS> <Category 15> <Category 30>

So that Category 15 and category 30 still drop down their sub-categories..

I hope I am making sense!

I could hard code the categories (in fact I have started that way) using main_page=index&cPath=119 for example but this will take a while and would not allow easy modification in the future...

Thanks in advance

Tony
Manually will be the best way, sorry!

17 Oct 2007, 8:57 PM
#552
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!

DatinBridal:

Hello

First off, I like to say I love this menu, it looks great in Firefox. I'd like to know how I get it to work in IE. In IE the menu drops down put it the text on the screen shows through and I am unable to click on the menu items.

Is there a fix for this?

Thank you very much,
Dave
http://datinbridal.com

First of all, you're using a menu created by someone else, not my menu... but I'm guessing that you're drop down menus work in IE if you go to https://www.datinbridal.com? To fix this, you'll first need to make sure that in your includes/configure.php file that you have http://datinbridal.com and NOT http://www.datinbridal.com. You'll need to make a root/.htaccess file with the code below, so that if someone goes to www, they automatically get directed to without the www:

## Add these to your .htaccess file so that only one way to your site exists, either [url]http://yoursite.com[/url] and [url]http://www.yoursite.com[/url] ... the following adds the www if it's missing:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^africanartandmasks.com$ [NC]
RewriteRule ^(.*)$ http://www.africanartandmasks.com/$1 [R=301,L]

## If you'd like your site to go to [url]http://mysite.com[/url] instead of [url]http://www.mysite.com[/url], add these changes instead:

##RewriteEngine On
##RewriteCond %{HTTP_HOST} ^www.yoursite.com$ [NC]
##RewriteRule ^(.*)$ http://yoursite.com/$1 [R=301,L]

## the following makes sure the correct mime type is sent for the .htc file
AddType text/x-component .htc
17 Oct 2007, 8:58 PM
#553
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!

fcegarra:

Sorry I think it is the wrong place......

Hello everyone,

I read a lot of the posts about the breadcrumb problems and the flyout categories but I can not fix my problem.
I can not see the parent caetgory when I click on a sub category.
For exemple, I should see :
Home > Jewelry > Necklaces when I click on the sub-category 'necklaces' but I SEE just Home > Necklaces

You can check it out here : http://www.viamarisnyc.com/zen/index.php?main_page=index&cPath=23

If you have any idea, don't hesitate, I am getting crazyy!!

thanks a lot

Francois

You need to download the newest version:

http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_47&products_id=479

Nevermind... I did not create a sidebox css menu... are you sure this is the right thread?

18 Oct 2007, 2:33 AM
#554
datinbridal avatar

datinbridal

New Zenner

Join Date:
Oct 2007
Posts:
25
Plugin Contributions:
0

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

jettrue:

First of all, you're using a menu created by someone else, not my menu... but I'm guessing that you're drop down menus work in IE if you go to https://www.datinbridal.com? To fix this, you'll first need to make sure that in your includes/configure.php file that you have http://datinbridal.com and NOT http://www.datinbridal.com. You'll need to make a root/.htaccess file with the code below, so that if someone goes to www, they automatically get directed to without the www:

Add these to your .htaccess file so that only one way to your site exists, either [url]http://yoursite.com[/url] and [url]http://www.yoursite.com[/url] ... the following adds the www if it's missing:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^africanartandmasks.com$ [NC]
RewriteRule ^(.*)$ http://www.africanartandmasks.com/$1 [R=301,L]

If you'd like your site to go to [url]http://mysite.com[/url] instead of [url]http://www.mysite.com[/url], add these changes instead:

##RewriteEngine On
##RewriteCond %{HTTP_HOST} ^www.yoursite.com$ [NC]
##RewriteRule ^(.*)$ http://yoursite.com/$1 [R=301,L]

the following makes sure the correct mime type is sent for the .htc file

AddType text/x-component .htc


Hello,

Thank you very much,

With allot of editing to the .css file and changing my catagories around I have it working now.  I appreciate your help very much.  For some reason when the top level catagories dropped down the lower level catagories showed through so it was almost imposible to make the selection we wanted.  But it's all good now.

Thanks again
Dave
<http://datinbridal.com>
18 Oct 2007, 6:26 AM
#555
davidandrews avatar

davidandrews

Zen Follower

Join Date:
Apr 2006
Posts:
108
Plugin Contributions:
0

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

Anyone know how to Altering the stylesheet so it the menu fills the screen width WITHOUT it starting a new line?

I have it working in Firefox and can resize the browser and it fits whatever size the browser is

in IE, at full screen, it kerns the "shopping cart" link onto another line.

if I adjust the window it will bring it onto the same line as the other main menu items, but kerns onto another line at full screen size

I have adjusted the stylesheet a little

So instead of:

div#dropMenu {
width:100%;
margin:0 auto;
text-align:center;
z-index:1000;
position:relative;
}

div#dropMenu ul {
margin:0;
padding:0;
}

div#dropMenu li {
position:relative;
list-style:none;
margin:0;
float:left;
line-height:1em;
width:16.667%;
}

div#dropMenu ul.level1 {
width:100%;
margin:0 auto;
text-align:center;
background:#0589a5;
z-index:1000;
float:left;
}

I have altered the width's to read 98% which works a little but leaves white space on either side (obviously)

is it other code which I need to alter?

Thanks for any help

18 Oct 2007, 10:55 AM
#556
lenny avatar

lenny

New Zenner

Join Date:
Aug 2006
Posts:
15
Plugin Contributions:
0

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

Hi there!

Nice contrib!

I am trying to have a different cattegory as site root (i use multishop contri), but i have not yet succeeded. Could you give me some tips how to accomplish this?

I have tried to set a differnent root in categories_ul_generator.php:

class zen_categories_ul_generator {
var
$root_category_id = 11,

But then there is no output.

Is there any other place i could try to hardcode this?

Thanks!

18 Oct 2007, 10:59 AM
#557
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!

davidandrews:

Anyone know how to Altering the stylesheet so it the menu fills the screen width WITHOUT it starting a new line?

I have it working in Firefox and can resize the browser and it fits whatever size the browser is

in IE, at full screen, it kerns the "shopping cart" link onto another line.

if I adjust the window it will bring it onto the same line as the other main menu items, but kerns onto another line at full screen size

Can I see your site? Are you using the most recent version of the menu?

18 Oct 2007, 11:00 AM
#558
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!

lenny:

Hi there!

Nice contrib!

I am trying to have a different cattegory as site root (i use multishop contri), but i have not yet succeeded. Could you give me some tips how to accomplish this?

I have tried to set a differnent root in categories_ul_generator.php:

class zen_categories_ul_generator {
var
$root_category_id = 11,

But then there is no output.

Is there any other place i could try to hardcode this?

Thanks!

Hmm, I'm not too sure of a way to automate this, you may have to get rid of the generated category portion, and hardcode your categories.

18 Oct 2007, 12:55 PM
#559
lenny avatar

lenny

New Zenner

Join Date:
Aug 2006
Posts:
15
Plugin Contributions:
0

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

jettrue:

Hmm, I'm not too sure of a way to automate this, you may have to get rid of the generated category portion, and hardcode your categories.

I have found it!!

In multisite module you can configure the site root category by defining var CATEGORIES_ROOT

Changes to file categories_ul_generator.php in case anyone else needs this:

About line 25
change

class zen_categories_ul_generator {
var $root_category_id = 0,
to
class zen_categories_ul_generator {
var $root_category_id = CATEGORIES_ROOT,

about line 56:
multisit mod has a cat_filter function for compatiblity with other mods
change

$categories = $db->Execute($categories_query);
to
$categories = $db->Execute(cat_filter($categories_query));

and about line 63:
change

function buildBranch($parent_id, $level = 1, $submenu=false) {
if ($parent_id != 0) {
to
function buildBranch($parent_id, $level = 1, $submenu=false) {
if ($parent_id != CATEGORIES_ROOT) {

Very happy with this contrib!!

:clap::clap::clap:

Grtz Lenny

18 Oct 2007, 3:59 PM
#560
soupcan avatar

soupcan

New Zenner

Join Date:
Oct 2007
Posts:
3
Plugin Contributions:
0

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

Hi all.

I've got a site that is just about done, but I've been wracking my brain over a few issues. I've gone through a good majority of the posts here over the last week or so and was not able to find a resolution.

In Internet Explorer (haven't had it happen in Firefox), when the CSS drop down menu comes in contact with a "Sort By" drop down menu in my catalog, the CSS drop down menu appears behind the "Sort By" drop down menu.

Any help is appreciated. If you need any other information, please let me know.

Thanks.