Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * - - 2 votes

CSS Menu


251 replies to this topic

#181 pure11

  • Community Member
  • 122 posts
  • Real Name:haers

Posted 10 December 2007, 06:15

i have a flash swf file on the left side and the menu on the right, so the menu branches off to load more categories , but since i added this flash image on the right, the menu loads UNDER the flash image, is there any way for me to make the menu load on TOP of anything and everything?


thanks

#182 pure11

  • Community Member
  • 122 posts
  • Real Name:haers

Posted 10 December 2007, 06:40

View Postpure11, on Dec 9 2007, 10:15 PM, said:

i have a flash swf file on the left side and the menu on the right, so the menu branches off to load more categories , but since i added this flash image on the right, the menu loads UNDER the flash image, is there any way for me to make the menu load on TOP of anything and everything?
thanks


nevermind i found a fix!!

wmode='transparent' width='425' height='355' add this to your flash code and menu will load on top!

Edited by pure11, 10 December 2007, 06:41.


#183 NooKyZ

  • Community Member
  • 7 posts
  • Real Name:Stephane
  • Gender:Male
  • Location:France

Posted 18 December 2007, 15:27

Hi, I like this contribution, but I want select just one or two categories ID to be visible in the css menu, (not enable/disable cat) in a standart categories box it's easy :-" (id = '100' for the example) but I really do not arrive there :'(
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '100' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
thank you for your assistance, and forgiveness for my bad English.

#184 qwerty555

  • Community Member
  • 6 posts
  • Real Name:asd fdfdf

Posted 27 December 2007, 01:17

How can i modify the configure_css.php so that after its been clicked a category, the category text turns BOLD or the clicked category box to change color (so that the client knows which category he is browsing through) ?

Edited by qwerty555, 27 December 2007, 01:18.


#185 pure11

  • Community Member
  • 122 posts
  • Real Name:haers

Posted 05 January 2008, 01:34

I want to remove a product from showing up on the menu, but have it still exist on the site (i want to link to that page from another menu i created on top) and only want this item to be accessable from the top menu.. does anyone know how to do this?


thanks

Edited by pure11, 05 January 2008, 01:35.


#186 mikefrombg

  • Community Member
  • 12 posts
  • Real Name:dimitar pavlov
  • Gender:Male

Posted 09 February 2008, 03:56

Hi All,

Thanks for that great looking contribution. I started reading the whole thread, but 10pages is too much :(., so here is my question (may be answered already):
How can I make it work after STS has been installed? and also sorry for my dumb question, but why is this right below the categories and how can I get rid of it?
"BOX_INFORMATION_ALLPRODS
BOX_SPECIALS_ALLPRODS
BOX_WHATSNEW_ALLPRODS "

Also by default the background color of the categories is black, how do I change it?

Thx again.

#187 scaistar

  • Community Member
  • 12 posts
  • Real Name:Scaistar

Posted 10 March 2008, 13:39

HI,
i'm using CSS Menu v0.4.1 and work ok.
Now want test Search Engine Friendly URL v1.11.zip but when i switch "Go to Configuration/Cache and turn on Caching"
menu stop work.. :-"
This is the error:

Quote

Warning: Invalid argument supplied for foreach() in ......\includes\boxes\categories_css.php on line 243
Warning: Invalid argument supplied for foreach() in .......\includes\boxes\categories_css.php on line 251

can help me?

Edited by scaistar, 10 March 2008, 13:40.


#188 jamartin

  • Community Member
  • 65 posts
  • Real Name:Javier Martínez Gómez

Posted 17 March 2008, 17:36

I've just added a little mod.

It stores the output of the css menu in a cache file. But it lacks of an admin section mod to update the cache file when the categories structure is changed (add a new category or delete a new one).

I hope you find this mod useful as long as it saves a lot of database queries.

Regards,
Hey!!... I still need help with this http://forums.oscommerce.com/index.php?showtopic=309208. Please, take a look on it.

#189 [S-K]

  • Community Member
  • 8 posts
  • Real Name:Tiago Sá
  • Gender:Male
  • Location:Moita, Portugal

Posted 18 March 2008, 04:51

thank you for devoloping this great addon, but i'm having problems instaling-it on Oscommerce 2.2rc2 w/STS, can someone give me a fail-safe manual ? :S

when i tried it gave me back the javascript code on the page before the rest of the template... i really don't know much about php/javascript :s

#190 [S-K]

  • Community Member
  • 8 posts
  • Real Name:Tiago Sá
  • Gender:Male
  • Location:Moita, Portugal

Posted 18 March 2008, 23:03

View Post[S-K], on Mar 18 2008, 04:51 AM, said:

thank you for devoloping this great addon, but i'm having problems instaling-it on Oscommerce 2.2rc2 w/STS, can someone give me a fail-safe manual ? :S

when i tried it gave me back the javascript code on the page before the rest of the template... i really don't know much about php/javascript :s

0) { print_r(multiArraySearch($v['parent_id'], $categories)); $categories[$v['parent_id']][$v['categories_id']] = $v; unset($categories[$v['categories_id']]); } } */ ?>  0 ) { $returnval .= "

	* "; } if ( $productsDisplay > $cssMenuConfig['maxProductsInMenu'] ) { $productsDisplay=$cssMenuConfig['maxProductsInMenu']; $addMore= true; } $count_string = ''; if (SHOW_COUNTS == 'true') { if ($totalitemsincategory > 0) { $count_string = ' (' . $totalitemsincategory . ')'; } } $i=0; while ($i < $productsDisplay) { $products = tep_db_fetch_array($products_query); $product_query = tep_db_query("select products_name from products_description where products_id = " . $products['products_id'] . " AND language_id = ".$languageID ); $product = tep_db_fetch_array($product_query); $returnval .= "".$product['products_name']."
	* \n"; $i++; } if ( $addMore ) { $returnval .= "".$cssMenuConfig['moreText']."
	  \n"; } if ( $productsDisplay > 0 || !$includeul ) { $returnval .= "

"; } return $returnval; } function PrintSubMenus( $parentID, $languageID, $start_path ){ global $cssMenuConfig, $categories_subs, $categories_start; $returnval = ''; if (($start_path == '') && ($parentID > 0)) { $start_path = $parentID; } else { if ($parentID > 0) $start_path .= "_" . $parentID; } if ($parentID != 0) { $returnval .= "

	  "; } else { $returnval .= "
	  "; $returnval .= "
		  o "; } // $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '".$parentID."' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languageID ."' order by sort_order, cd.categories_name"); foreach($categories_start as $key => $value) { if(strstr($key, '_' . $parentID)) { $cat_subs[$parentID][] = substr($key, 0, strpos($key, "_")); } } foreach ($cat_subs[$parentID] as $v) { //$categories = tep_db_fetch_array($categories_query) $categories = $categories_start[$v . '_' . $parentID]; if ($start_path == "") { $grouppath = $categories['categories_id']; } else { $grouppath = $start_path . "_" . $categories['categories_id']; } $cPath_new = 'cPath=' . $grouppath; $categories_string = tep_href_link(FILENAME_DEFAULT, $cPath_new); $totalitemsincategory = tep_count_products_in_category($categories['categories_id']); $count_string = ''; if ((SHOW_COUNTS == 'true') && ($totalitemsincategory > 0) ){ $count_string = ' (' . $totalitemsincategory . ')'; } if (cssMenu_ShowCategory($cssMenuConfig['ShowEmptyCategories'], $totalitemsincategory)) { $returnval .= "".$categories['categories_name'].$count_string."\n"; } if (array_key_exists($categories['categories_id'], $categories_subs)) { //tep_has_category_subcategories($categories['categories_id']) $returnval .= PrintSubMenus( $categories['categories_id'], $languageID, $start_path ); if ( $cssMenuConfig['includeProducts'] ) { $returnval .= PrintProducts($categories['categories_id'],$categories_string, false, $languageID); } } else { if ( $cssMenuConfig['includeProducts'] ) { $returnval .= PrintProducts($categories['categories_id'],$categories_string, true, $languageID); } } if (cssMenu_ShowCategory($cssMenuConfig['ShowEmptyCategories'], $totalitemsincategory)) { $returnval .= "
			"; } } if ( !$cssMenuConfig['includeProducts'] ) { $returnval .= ""; } if ($parentID == 0) $returnval .= "
	  "; return $returnval; } function cssMenu_ShowCategory( $switch, $products) { if ( $switch == 1 ) { return true; } else { if ($products > 0) { return true; } else { return false; } } } ?>
	  Fatal error: Call to undefined function PrintSubMenus() in C:\Programas\EasyPHP 2.0b1\www\includes\boxes\categories.php on line 320
when i try to use the categories_css it gives me this error, without sts, with sts it gets worst :s

#191 yatahaze

  • Community Member
  • 164 posts
  • Real Name:Ryan
  • Location:Canada

Posted 19 March 2008, 17:12

There is a firefox compatibility bug with this. If there is a category with only inactive items in it, the very first category in the menu will always list the subcategories, regardless of what category you are hovering over. I'm pretty sure this only happens when "hide empty categories" is turned on.

Less important, but still viable:

There is also lots of excess UL and LI openings and closings that cause there to be gaps where empty categories are. Basically they aren't being completely hidden.

The W3C validator complains a lot about the code generated by this menu as well, mostly to do with the hidden empty categories.

#192 yatahaze

  • Community Member
  • 164 posts
  • Real Name:Ryan
  • Location:Canada

Posted 19 March 2008, 18:03

View Postyatahaze, on Mar 19 2008, 10:12 AM, said:

There is a firefox compatibility bug with this.

I figured out what the problem is, I'm just not sure how to solve it. It's all of the excess list items at the end of the menu.

I was messing with the generated source code in dreamweaver. At the end of all the list items I changed the following from this:
</li></ul></li><ul><ul></ul><ul></ul><ul></ul><ul></ul><ul></ul><ul></ul></ul></ul></div></td>
to this:
</li></ul></li></li></ul></div></td>
The menu went back to functioning normally.

Now the script that generates the menu needs to be fixed. I'm not quite sure how to do that.

Edited by yatahaze, 19 March 2008, 18:04.


#193 sitefire

  • Community Member
  • 31 posts
  • Real Name:Craig

Posted 05 May 2008, 16:12

Hey mikefrombg

This worked for my install with OSC RC2.2a and STS 4.5.8 Note: I used CSS Menu ver 0.3, once you get this working you can tweek it with the updates from later versions as I have not tested it with later versions.
FOR STS USERS ONLY! AND MAKE A BACKUP OF ALL EFFECTED FILES FIRST SO IF SOMETHING GOES WRONG YOU CAN GET BACK TO A WORKING STATE.
Upload included files from the contrib first : )

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
catalog/includes column_left.php

Find:

} else {
include(DIR_WS_BOXES . 'categories.php');

Change to:

} else {
include(DIR_WS_BOXES . 'categories_css.php');

The only thing you realy do here is change the portion 'categories.php' to 'categories_css.php'

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

catalog/includes/functions cache.php

Find:

ob_start();
include(DIR_WS_BOXES . 'categories.php');

Change to:

ob_start();
include(DIR_WS_BOXES . 'categories_css.php');

The only thing you realy do here is change the portion 'categories.php' to 'categories_css.php'

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

For STS USERS ONLY

catalog/includes/modules sts_inc/column_left.php

Find:

} else {
include(DIR_WS_BOXES . 'categories.php');

Change to:

} else {
include(DIR_WS_BOXES . 'categories_css.php');

The only thing you realy do here is change the portion 'categories.php' to 'categories_css.php'

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

For STS USERS ONLY

catalog/includes/sts_templates/"your default folder"/sts_template.html

Add just below the <head> tag

<script type="text/javascript">

//SuckerTree Vertical Menu (Aug 4th, 06)
//By Dynamic Drive: http://www.dynamicdrive.com/style/

var menuids=["suckertree1"] //Enter id(s) of SuckerTree UL menus, separated by commas

function buildsubmenus(){
for (var i=0; i<menuids.length; i++){
var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
for (var t=0; t<ultags.length; t++){
ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
ultags[t].parentNode.onmouseover=function(){
this.getElementsByTagName("ul")[0].style.display="block"
}
ultags[t].parentNode.onmouseout=function(){
this.getElementsByTagName("ul")[0].style.display="none"
}
}
}
}

if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus)

</script>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
You can customize the way the menu looks with the stylesheet settings below.
In catalog/stylesheet.css

Find:

TD.headerInfo {
font-family: Tahoma, Verdana, Arial, sans-serif;
font-size: 12px;
background: #00ff00;
color: #ffffff;
font-weight: bold;
text-align: center;
}

Add just below:(placement is not critical)

.suckerdiv ul{
margin: 0;
padding: 0;
list-style-type: none;
width: 200px; /* Width of Menu Items */
border-bottom: 1px solid #ccc;
font-family: arial;
font-size: 11px;
}

.suckerdiv ul li{
position: relative;
background-color: #eee;
}

/*1st level sub menu style */
.suckerdiv ul li ul{
left: 199px; /* Parent menu width - 1*/
position: absolute;
width: 200px; /*sub menu width*/
top: 0;
display: none;
}

/*All subsequent sub menu levels offset */
.suckerdiv ul li ul li ul{
left: 199px; /* Parent menu width - 1*/
}

/*All subsequent sub menu levels offset */
.suckerdiv ul li ul li a{
left: 199px; /* Parent menu width - 1*/
background-color: #ddd;
}

/*All subsequent sub menu levels offset */
.suckerdiv ul li ul li ul li a{
background-color: #bbb;
}

/*All subsequent sub menu levels offset */
.suckerdiv ul li ul li ul li ul li a{
background-color: #aaa;
}

/* menu links style */
.suckerdiv ul li a{
display: block;
color: black;
text-decoration: none;
background-color: #eee;
padding: 1px 5px;
border: 1px solid #ccc;
border-bottom: 0;
line-height: 2em;
}

.suckerdiv ul li a:visited{
color: black;
}

.suckerdiv ul li a:hover{
background-color: yellow;
color: black;
text-decoration: none;
}

.suckerdiv ul li ul li a:hover{
background-color: yellow;
color: black;
text-decoration: none;
}

.suckerdiv ul li ul li ul li a:hover{
background-color: yellow;
color: black;
text-decoration: none;
}

/* The main categories with sub-categories */
.suckerdiv .subfolderstyle{
background: url(images/arrow-list.gif) no-repeat center right;
}

/* This one colors the sub-folder with other sub-folders */
.suckerdiv ul li ul .subfolderstyle {
background-color: #ddd;
}

/* This one colors the sub-folder with other sub-folders */
.suckerdiv ul li ul li ul .subfolderstyle {
background-color: #bbb;
}

/* This one colors the sub-folder with other sub-folders */
.suckerdiv ul li ul li ul li ul .subfolderstyle {
background-color: #aaa;
}

/* Holly Hack for IE \*/
* html .suckerdiv ul li { float: left; height: 1%; }
* html .suckerdiv ul li a { height: 1%; }
/* End */

Edited by sitefire, 05 May 2008, 16:15.


#194 mazorkam

  • Community Member
  • 12 posts
  • Real Name:murtopo

Posted 12 May 2008, 17:28

I instlalled this great contribution...waw.....

I have a litle problem...
I set my page web width 90%...
when I click on index or default page ..it show full page..
but when I click on product it look well or 90% width..

there's anything wrong with my code on index.php or may be in configure_css.php.

thanks for the attention n sory for m y bad english
warmest regards from indonesia..

#195 bec

  • Community Member
  • 1 posts
  • Real Name:Carlos

Posted 20 May 2008, 16:51

great contribution(one year that i have this menu)...work well in IE6 and Firefox 2...the problem is in IE7, anyone can help me.

is there a space between categories....like that:

[img]http://i301.photobucket.com/albums/nn64/CarlsF/CSS_MENU.jpg[/img]

#196 sitefire

  • Community Member
  • 31 posts
  • Real Name:Craig

Posted 21 May 2008, 04:11

Wanted to see if anyone else is having this issue or knows a fix.
When you first load your page if you click on one of the css menu links it reloads the same page, the second and all other clicks in the same browser session work fine, just the first click.
It looks like its some type of cache issue.
This is the same in Firefox or IE
Anyone have a clue as to what the issue is?
I'm using ver 3 CSS Menu as most of the later fixes didn't affect my setup.

#197 Ken44

  • Community Member
  • 214 posts
  • Real Name:Ken
  • Gender:Male
  • Location:UK

Posted 08 June 2008, 14:10

Hi

I have installed this menu and have it up and running fine.

I have also installed the cache add-on which is caching the menu however it is also caching the session ID. This is not good as all customers will get the same oscsid.

Can anyone help to remove the session from the cache and then add it back to the right customer.

Here is the code from jamartin’s contribution

INSTRUCTIONS:

in catalog/includes/boxes/categories_css.php

almost in the Enf of the File Find:

  $info_box_contents = array();
  $info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

  new infoBoxHeading($info_box_contents, true, false);

  $info_box_contents = array();


After that insert:

  if (!file_exists(DIR_FS_CATALOG . '/cache/categories.css.php')){
	  $categories_content = PrintSubMenus( 0, $languages_id, '' );
	$cache= '<?php
			$categories_content = "' . str_replace( '"', '\"',  $categories_content) . '";
			?>';
	$fp = fopen(DIR_FS_CATALOG . '/cache/categories.css.php' , 'w');
	$fout = fwrite($fp , $cache);
	fclose($fp);
  }  else {
	  require(DIR_FS_CATALOG . '/cache/categories.css.php');
  }


Find:

  $info_box_contents[] = array('text' => PrintSubMenus( 0, $languages_id, '' ) );

And Replace with:

  $info_box_contents[] = array('text' => $categories_content );


Thanks

Ken

#198 aabnoguera

  • Community Member
  • 6 posts
  • Real Name:angelo noguera

Posted 09 June 2008, 12:21

hi friends

in my house, I installed oscommerce 2.2rc2a using xampp. until there all good. then I installed css menu. everything functioned perfectly well. But, when I pass to the server, correctly is located. But a click is enough so that they disappear and come back to appear the original menu of oscommerce. which the configuration that I am not making? (for example: www.inforzone.net/tienda)

thank you!

#199 ultras.nick

  • Community Member
  • 43 posts
  • Real Name:Nick

Posted 17 July 2008, 19:48

I have installed css_menu, but I have a display problem.

On my shop around the category box, a white border appears, like in the picture below.

Can someone tell me how can I get rid of that border?

Can this be because I use a bought template?

Thanks in advance.
Any help will be highly appreciated.

[img]http://img383.imageshack.us/img383/8531/categoriesle0.jpg[/img]

Edited by ultras.nick, 17 July 2008, 19:49.


#200 spooks

  • Community Member
  • 6,668 posts
  • Real Name:Sam
  • Gender:Male
  • Location:UK

Posted 17 July 2008, 21:30

Its a infobox, so set that
Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Post osC questions don't PM them. Vampire?

Contributions:

Multi Images with Fancy Popups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.