Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * - - 2 votes

CSS Menu


251 replies to this topic

#1 fear4me

  • Community Member
  • 22 posts
  • Real Name:Roger Godefroy

Posted 06 October 2006, 09:22

Hi!

I've just dropped CSS Menu version 0.1 at the contribution-page at osCommerce. This thread will be used to support this contribution. :thumbsup:

Roger

#2 TheExterminator

  • Community Member
  • 121 posts
  • Real Name:Michael
  • Gender:Male
  • Location:Denmark

Posted 06 October 2006, 19:04

How can i do, so it take the css fra the stylesheet file. ??? is direct in the file now.

#3 fear4me

  • Community Member
  • 22 posts
  • Real Name:Roger Godefroy

Posted 06 October 2006, 19:39

View PostTheExterminator, on Oct 6 2006, 09:04 PM, said:

How can i do, so it take the css fra the stylesheet file. ??? is direct in the file now.

Just cut the part between:

<style type="text/css">

and

</style>

and paste it into stylesheet.css.

Then the above tags can be removed from categories_css.php

Roger

Edited by fear4me, 06 October 2006, 19:40.


#4 TheExterminator

  • Community Member
  • 121 posts
  • Real Name:Michael
  • Gender:Male
  • Location:Denmark

Posted 07 October 2006, 04:25

View Postfear4me, on Oct 6 2006, 09:39 PM, said:

Just cut the part between:

<style type="text/css">

and

</style>

and paste it into stylesheet.css.

Then the above tags can be removed from categories_css.php

Roger

Thanks alot

#5 Vmotion

  • Community Member
  • 17 posts
  • Real Name:Simon

Posted 07 October 2006, 17:34

I really like you CSS Menu. I installed it last night and it works great. Thanks for the contribution.
I do have a question. I know nothing about CSS but is there a way to make it only do the first subcategory and not any other sub category after that? Also instead of flying out to the right or left can it be a vertical pull down (for lack of a better term)?

Here is an example site with categories that pull down.
http://www.flashdesigntemplates.com/imageviewerplus_xl/

Click on the "Launch popup screen" selection and then take a look at there categories and you will see what I mean.

Thanks

#6 yatahaze

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

Posted 10 October 2006, 16:46

Can you update this to hide categories with no products? Or an option to?

#7 insomniac2

  • Community Member
  • 407 posts
  • Real Name:Don

Posted 10 October 2006, 22:35

Ya you can hide cats with 0 prods:


Find the first section:

while ($categories = tep_db_fetch_array($categories_query)) {

if ($parent_id == '0') {
$categories_array[] = array('id' => $categories['categories_id'],
'text' => $indent . $categories['categories_name']);
} else {
$categories_array[] = array('id' => $path . $parent_id . '_' . $categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}


CHANGE TO:

while ($categories = tep_db_fetch_array($categories_query)) {

if (!tep_count_products_in_category($categories['categories_id']) == 0) { // line added do not show categories with 0 products mod

if ($parent_id == '0') {
$categories_array[] = array('id' => $categories['categories_id'],
'text' => $indent . $categories['categories_name']);
} else {
$categories_array[] = array('id' => $path . $parent_id . '_' . $categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}
} // line added from do not show categories with 0 products mod


Find the next section:

while ($categories = tep_db_fetch_array($categories_query)) {
if ($start_path == '') {
$grouppath = $categories['categories_id'];
} else {
$grouppath = $start_path . '_' . $categories['categories_id'];
}
$cPath_new = 'cPath=' . $grouppath;


CHANGE TO:

while ($categories = tep_db_fetch_array($categories_query)) {
if (!tep_count_products_in_category($categories['categories_id']) == 0) { // line added do not show categories with 0 products mod
if ($start_path == '') {
$grouppath = $categories['categories_id'];
} else {
$grouppath = $start_path . '_' . $categories['categories_id'];
}
$cPath_new = 'cPath=' . $grouppath;


And lastly find:

$returnval .= "<li><a href='" . $categories_string . "'>" . tep_image(DIR_WS_IMAGES . 'icons/arrow_red.gif', 'Available Selections', '4', '8') . '&nbsp;&nbsp;' . $categories['categories_name'] . "</a>";


CHANGE TO:

$returnval .= "<li><a href='" . $categories_string . "'>" . tep_image(DIR_WS_IMAGES . 'icons/arrow_red.gif', 'Available Selections', '4', '8') . '&nbsp;&nbsp;' . $categories['categories_name'] . "</a>";

} // line added from do not show categories with 0 products mod

#8 sappura

  • Community Member
  • 13 posts
  • Real Name:Satu

Posted 10 October 2006, 23:25

This is excellent conrtibution! Today I installed 3 different menus...oh what a pain, but then I discovered this...ahhh....excellent! Thank you very much!

#9 fear4me

  • Community Member
  • 22 posts
  • Real Name:Roger Godefroy

Posted 11 October 2006, 07:34

I'll release version 0.2 today with the option build in to show / hide subcategories with 0 items. I also added a cache-part, so the menu gets cached by osCommerce (thanks to 100asa).

#10 olivierk74

  • Community Member
  • 2 posts
  • Real Name:Kobus

Posted 11 October 2006, 08:40

Thanks...excellent contribution! :thumbsup:

Only problem i've got :
When i enable sts, my categories is not displaying correctly anymore.

With STS enabled i've edited file : sts_column_left.php (categories.php to categories_css.php)

When i disable STS, everything displays 100% again!

Any help!

Thanks

#11 fear4me

  • Community Member
  • 22 posts
  • Real Name:Roger Godefroy

Posted 11 October 2006, 10:02

View Postolivierk74, on Oct 11 2006, 10:40 AM, said:

Thanks...excellent contribution! :thumbsup:

Only problem i've got :
When i enable sts, my categories is not displaying correctly anymore.

With STS enabled i've edited file : sts_column_left.php (categories.php to categories_css.php)

When i disable STS, everything displays 100% again!

Any help!

Thanks

Unfortunately I haven't got the time to test using STS. I'm not sure how STS exactly calls the categories-menu. What do you see when you include CSS Menu in STS? Do you have an URL?

#12 olivierk74

  • Community Member
  • 2 posts
  • Real Name:Kobus

Posted 11 October 2006, 10:48

Basically the categories displays almost the same as by default.
http://www.venuz.co.za/catalog

#13 Fugazi

  • Community Member
  • 3 posts
  • Real Name:Phil

Posted 11 October 2006, 11:20

Great Contribution, as it just displays categories at the moment, does anymore plan to take this down to product level, be nice to have the complete inventory of products under the list.....

or am i missing something :)

#14 fear4me

  • Community Member
  • 22 posts
  • Real Name:Roger Godefroy

Posted 11 October 2006, 12:14

View Postolivierk74, on Oct 11 2006, 12:48 PM, said:

Basically the categories displays almost the same as by default.
http://www.venuz.co.za/catalog

You could cut the part at categories_css.php between <style .... and </style> and paste it into your stylesheet.css. Than this piece of code should also work with STS.

Edited by fear4me, 11 October 2006, 12:15.


#15 yatahaze

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

Posted 11 October 2006, 18:16

I think it would be useful that when someone finds their way through the menu to the spot they're at, the category they're in expands just like the original osc menu (like it shows all the subcategories underneath) so they dont have to navigate through the menu just to let's say, go to another subcategory in the same category. This make sense? :)

#16 Vmotion

  • Community Member
  • 17 posts
  • Real Name:Simon

Posted 11 October 2006, 20:22

How do you add images?

This is a great contribution

#17 racelinedigital

  • Community Member
  • 28 posts
  • Real Name:Lisa Lyle
  • Location:Canada

Posted 12 October 2006, 05:07

I don't really want the CSS Menu now, but I'd like to keep the option of turning off menus with no products. Is there another contribution that does this, or can someone help me take out the necessary code and put it into my 'categories.php'?

Thanks!
Lisa

PS - this is a great contribution, I just cannot get it to work with the 'Simple Template System' contribution.

#18 Dennis_gull

  • Community Member
  • 373 posts
  • Real Name:Dennis
  • Gender:Male
  • Location:Sweden

Posted 13 October 2006, 08:08

Is there any way to make the picture fade when you hold over it? like on Vmotions site.

Edited by Dennis_gull, 13 October 2006, 08:09.


#19 Ash786

  • Community Member
  • 1 posts
  • Real Name:Mohammed Ashaq

Posted 15 October 2006, 09:02

Hi & thanks for this contribution. It has been very easy to install with brilliant functionality.

I have an issue using it though, it's not cos of the actual coding but just because of the way my site is setup.
The issue I am having is that I have an iframe which displays a gallery on the main page and although the menu works perfectly, when I get certain sub-categories inline with my iframe, they display but get hidden behind the iframe.

Is there a setting either in this menu or maybe in the iframe that i can adjust to make the menu stay in the foreground so it doesn't get hidden?

Any suggestions would be apprecited.

To see the issue I am having you can visit my test site

Visit demo site to see issue

#20 Vmotion

  • Community Member
  • 17 posts
  • Real Name:Simon

Posted 15 October 2006, 13:53

View PostAsh786, on Oct 15 2006, 05:02 AM, said:

Hi & thanks for this contribution. It has been very easy to install with brilliant functionality.

I have an issue using it though, it's not cos of the actual coding but just because of the way my site is setup.
The issue I am having is that I have an iframe which displays a gallery on the main page and although the menu works perfectly, when I get certain sub-categories inline with my iframe, they display but get hidden behind the iframe.

Is there a setting either in this menu or maybe in the iframe that i can adjust to make the menu stay in the foreground so it doesn't get hidden?

Any suggestions would be apprecited.

To see the issue I am having you can visit my test site

Visit demo site to see issue


First I want to say, "awesome site, WOW",
Second, I'm having the same problem. Can anyone helps us?