Zen Follower
- Join Date:
- Mar 2009
- Posts:
- 418
- Plugin Contributions:
- 0
CSS Dropdown menu for the header- With Categories!
Ladydee,
Don't forget spell-check. Several products have the title word "Latern. Change to "Lantern." This is a very nice site.
Views: 615,493
Zen Follower
Ladydee,
Don't forget spell-check. Several products have the title word "Latern. Change to "Lantern." This is a very nice site.
Zen Follower
Thank you. I need all the help I can get the client changes his mind on how he wants things every time I get it done the way he wanted it, then he changes his mind.
LadyDee
New Zenner
I have a question that someone might be able to answer, I only want my Categories to only show the first submenu and not drill deeper than the main categories.
Categories->Main_Category_1->subcategory||STOP!
I know it has to be in the categories_ul_generator.php and has to do with the build branch function but the recursiveness of it is a bit over my head. :frusty:
New Zenner
Hi, I'm having a slight issue with the drop down. I installed the apple zen template and added in some categories and sub categories. If you start working your way through the drop down for Catgories>For Baby>Diapers>Diapering & Training Accessories .... at that point ALL of the submenus below that fly out at once instead of one at a time. It does this in another place or two where there are quite a few flyouts. Can anyone tell me how to make it stop doing so and only flyout the 'next' sub category? I have tried the search feature, but I'm not sure the terms that I'm searching for would be the proper ones that people may have used before to ask about this issue.
A link to the site is http://funkymunkys.ca
Thank you.
Zen Follower
@funkypapa
Not sure, but it might be something with you having lots of categories, but no active products in any category apart from the test category.
Craig
New Zenner
fabulousspree:
Hi,
Thank you very much for your wonderful work. I am new to zen cart and have installed the CSS flyout header.
However, my logo now turns out to be very small in the top corner with the 'Home' and 'Login/Register' still there. How should I edit my tpl_header?
I would appreciate it very much if you could help me with this. By the way, you can see what I meant from here:
https://www.fabulous-spree.com
Thanks a million :)
HI Fabulousspree, in relation to your post at 1780, I had the same problem and isolated it to the tpl_header.php file. I then compared the text in that file to the original zencart tpl_header.php file. Line 70 of the dropdown version has reads:
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT, HEADER_LOGO_WIDTH, HEADER_LOGO_HEIGHT) . '</a>'; ?></div>You need to delete the part of this line that mentions HEADER_LOGO_WIDTH, HEADER_LOGO_HEIGHT.
the corrected line will read:
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>I found this fixed the problem for me on two of my websites. hopefully it is the solution to your situation too.
Kayamaya
Zen Follower
Hello, i have this mod installed on my store and it looks great, but in IE7 it shifts the whole page body to the right. Also in IE7 the submenu is overlapping the top menu on mouse hover. I have followed all the instructions in the readme about htaccess and csshover. I do have several errors remaining in my html, but i'm not sure they are the cause and i don't know how to fix them.
Here's my website: http://lemy.co.uk
Any help would be very much appreciated!
New Zenner
I have install this mod and I think it is great I haven't found any real bad issues and I did look through this thread but I couldn't fing the answer for the issues I am having.
However, there are three issues that I can not work out, one is that in IE there seems to be a faint line between the website banner and the header that's above the drop down menu yet it is displaying correctly in FF.
The other issue is how do I enlarge the font size in the drop down menu as it is all very small.
The other issue is I have image handler installed also, and since installing the drop down menu when viewing a product the image is small like it is in the display of the category or sub-category it doesnt enlarge when you hover over it with the mouse the image is only enlarged when clicking on it.
I have to admit the website is heavily modified, but if someone could help me out with the issues i am having since installing the drop down menu I would really appreciate it.
Here is a link to the website http://www.fantasy-art-originals.com
Zen Follower
I like what you did, what did you do to get both bars on top just below the logo. In other words which contributes did you use. Also suppose you have subcategories?
Thank you
Zen Follower
seanymph Re: CSS Dropdown menu for your header- With Categories!
I have install this mod and I think it is great I haven't found any real bad issues and I did look through this thread but I couldn't fing the answer for the issues I am having.
However, there are three issues that I can not work out, one is that in IE there seems to be a faint line between the website banner and the header that's above the drop down menu yet it is displaying correctly in FF.
The other issue is how do I enlarge the font size in the drop down menu as it is all very small.
The other issue is I have image handler installed also, and since installing the drop down menu when viewing a product the image is small like it is in the display of the category or sub-category it doesnt enlarge when you hover over it with the mouse the image is only enlarged when clicking on it.
I have to admit the website is heavily modified, but if someone could help me out with the issues i am having since installing the drop down menu I would really appreciate it.
Here is a link to the website http://www.fantasy-art-originals.com
In your stylesheet.css find the following:
#logoWrapper
and add the following to the statement:
margin-bottom: -0.2em;
As regards all the other add-ons you've installed you might have to go through all the add-ons to see which files would have been affected from installing the drop down and merge them as oppose to overwriting them.
The text size can be changed by adding:
text-size: 1em; (or any size you like instead of 1em)
To the appropriate statement in the stylesheet.
New Zenner
This is a long thread!
I have installed the menu and it works great in Firefox, in internet explorer compatability mode the links are cut off - ie not visible when it reaches centre column - i have tried playing around with z - index's but cant get it to work....
website: https://www.fastenerforce.co.uk
Any help appreciated - thanks.
Zen Follower
Your site is working fine...? I viewed in IE8, Firefox and Chrome and everythings ok.
New Zenner
Yes it is sorry,
I just fixed it by moving the code in the tpl_header file...Thanks.
New Zenner
Thank you first trading that code you gave me for the stylesheet fixed the problem.
Now I have to go through and check all the addon files :(
New Zenner
My Sub Menu Items in Internet Explorer compatability mode are now showing up wrong.... I am using the original styles an the sumenu text is being overlapped.....
https://www.fastenerforce.co.uk
Does any one know a quick fix? Thanks
Zen Follower
It looks ok in IE8. Did you fix this yet...?
seanymph Re: CSS Dropdown menu for your header- With Categories!
Thank you first trading that code you gave me for the stylesheet fixed the problem.
Now I have to go through and check all the addon files
LOL, i know how that feels, good luck.:D
New Zenner
Hello, Is there a way to have this mod show a subcategory (dynamically )as top title instead of just the 'categories' with all subcategories as a submenu? I would gather have my top categories horizontally displayed with their subcategories dropping under each.
I'll keep searching through this thread for answers, but if someone could point me to the answer faster that would be awesome.
New Zenner
I used the below code and it is working. I'm wondering how to take out 'Categories" from the menu though, and just have the top categories in my menu?
<?php
class zen_categories_ul_generator {
var $root_category_id = 0,
$max_level = 6,
$data = array(),
$root_start_string = '',
$root_end_string = '',
$parent_start_string = '',
$parent_end_string = '',
$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($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 = 1, $submenu=false) {
if ($parent_id != '0') {
$result = sprintf($this->parent_group_start_string, ($submenu==true) ? ' class="level'. ($level) . '"' : '' );
}
if (($this->data[$parent_id])) {
foreach($this->data[$parent_id] as $category_id => $category) {
$category_link = $category_id;
if (($this->data[$category_id])) {
$result .= sprintf($this->child_start_string, ($submenu==true) ? ' class="submenu"' : '');
} else {
if (($this->data[$category_id]) && ($submenu==false)) {
$result .= sprintf($this->parent_group_start_string, ($submenu==true) ? ' class="level'. ($level+1) . '"' : '');
$result .= sprintf($this->child_start_string, ($submenu==true) ? ' class="submenu"' : '');
} else {
$result .= sprintf($this->child_start_string, '');
}
}
if ($level == 0) {
$result .= $this->root_start_string;
}
$result .= str_repeat($this->spacer_string, $this->spacer_multiplier * $level) . '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link) . '">';
$result .= $category['name'];
$result .= '</a>';
if ($level == 0) {
$result .= $this->root_end_string;
}
if (($this->data[$category_id])) {
$result .= $this->parent_end_string;
}
if (($this->data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level+1))) {
$result .= $this->buildBranch($category_id, $level+1, $submenu);
}
$result .= $this->child_end_string;
}
}
if ($level > 0) {
$result .= $this->parent_group_end_string;
}
return $result;
}
function buildTree($submenu=false)
{
return $this->buildBranch($this->root_category_id, '', $submenu);
}
}
?>
New Zenner
see above for code for my modifiedcategories_ul_generator.php file.
The 'categories' tab in the navigation bar just goes to the site tree when clicked, which i don't want people to go to and it looks ugly. Is there a way to take out 'categories' and just leave the top categories in the navigation bar?
New Zenner
hamstertamer:
see above for code for my modifiedcategories_ul_generator.php file.
The 'categories' tab in the navigation bar just goes to the site tree when clicked, which i don't want people to go to and it looks ugly. Is there a way to take out 'categories' and just leave the top categories in the navigation bar?
I figured it out. The 'categories' tab was created in the navigation bar by the tpl_drop_menu.php file in the common folder. I just deleted it out, and now the drop down navigation bar works like i want it to.
Fields marked required must be completed.
Tell staff why this post should be reviewed.