Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Category Box as Nested Unordered List v1.0


nate_02631

Recommended Posts

Yes, there is, though it's a bit beyond the scope of the contribution (and this thread)... Check the included CSS for hints... #nav LI, is the first level #nav UL LI, the second, and so on... More info likely available on the Internets...

oh ok i thought it was simi simple :P

all the other stuff i kinda been figuring out as i go along.

Link to comment
Share on other sites

  • Replies 98
  • Created
  • Last Reply

Top Posters In This Topic

Hello again....

 

I have installed this contrib to my site and set the CSS to make the first two levels of my list always visible and the final subcategories are set to fly-out. It looks great!! My problem is however, that the selected class makes my entire first set of subcategories(the always visible sub-set) highlight when a third and final set is selected.

 

like this:

 

Untitled-1.jpg

 

This happens even when a first category(like "Football") is selected. The entire sub-set gets the highlight. I see that it is because the <li class="selected"> doesn't get a </li> until the last sub-category. Do you know how I can have only the proper category highlighted for this CSS layout? It seems at this point I need to change the ul_categories.php to render a new class. I'm not sure what the right steps are yet, please help if you can.

 

Thank you

Edited by EidolonNight

James Tomasello

Link to comment
Share on other sites

Please forgive my last post!

 

That is not correct either. What I need is for the top category to have a special class. let's say... #nav main or #nav top. How can this be properly applied?

James Tomasello

Link to comment
Share on other sites

I think I know how this can work but I can't seem to get the code to work right. If I can get the code to look at the parent id and give a class name of "top" or "main" or whatever to all categories with a parent id of 0, then I can get my CSS to manipulate the list properly. I have tried a few times to make it work but I'm afraid I don't understand exactly how to write this If statement. I am going to do a little more research, but feel free to post your thoughts on this.

 

Thank you

James Tomasello

Link to comment
Share on other sites

Here is a question, and maybe it doesn't belong in this thread but it directly relates to the problem I am having.

 

Can any one element(<div>,<li>,<td>,etc.) have more than one class? (<a class="top", "daddy" href=....)

 

That may not be the correct way to write it, but is this even possible?

James Tomasello

Link to comment
Share on other sites

Would have replied sooner - I don't know why - but I don't get email notifications on posts :(

 

Can any one element(<div>,<li>,<td>,etc.) have more than one class? (<a class="top", "daddy" href=....)

Yes, you can assign more than class to an element, just separate them with spaces. Looks something like...

<div class="firstclass secondclass"></div>

P.S. I have recently released another category menu replacement, thread readers might be interested in - "DynaMenu" for osCommerce. It makes use of the excellent PHP Layers Menu library to build horizontal drop-down, fly-out and tree menus (as well as plain menus)...

 

Check it out here:

http://www.oscommerce.com/community/contributions,4228

** Please do not PM with personal support requests (even if offering "payment"). Thank you.

Link to comment
Share on other sites

Newbie question, I am trying to change the bullets to a .gif file. How can I modify this?

In your stylesheet, usually something like:

UL, UL LI {
list-style-image: url('/path/to/my/image.gif');
}

More generic info about styling lists with CSS available in the web...

** Please do not PM with personal support requests (even if offering "payment"). Thank you.

Link to comment
Share on other sites

  • 3 weeks later...

I added this to a site and it worked fine. I'm working on a parallel site on the same server space in "root/redesign/catalog..." This is both a redesign and an update to the most recent version of OsCommerce. I have the sts and infobox contributions installed on both installations.

 

My problem is that on the parallel site, the classnames come out blank: <ul id="">. Could the problem be that the installation is in "root/redesign/catalog..." and not "root/catalog..." ?

 

Otherwise, what else could be wrong?

Link to comment
Share on other sites

hi can somone help

 

I have installed this contribution on both our sites the .co.uk site works fine but the .com site is using the bts template system and i am not sure how to get it to work please can some one take a look for me as the menu should be down the side but instead it goes accross I have used the correct file and is the same as our .co.uk site.

 

 

not working http://www.pcgiant.com/catalog/index.php

 

Working http://www.pcgiant.co.uk/catalog/index.php

 

 

Hope someone can help

 

Kind Regards

 

PC Giant

Link to comment
Share on other sites

Sorry another post should have asked in the earlier post is there any way to delay the folding of the menu like with dhtml you can use var DissapearDelay=700; // delay before menu folds in. how can we implement this into this contribution (Category Box as Nested Unordered List v1.0) as now it is very sensitive so if you move the mouse a little over the edge of the menu the menu folds instant we need to delay this for 1 sec but only the folding of the menu the expansion of the menu should be instant.

 

Hope some one can help

 

I would like to thank the author of this contribution Fantastic menu but I still cannot get it to work with BTS.

 

Thank you in advance

Link to comment
Share on other sites

Please can anyone help seems like i am on my own in this forum please hope some one can spare a few mins to help me with this it is realy starting to get to me I dont want to go another day banging my head against the wall please need help with below and above

 

Sorry another post should have asked in the earlier post is there any way to delay the folding of the menu like with dhtml you can use var DissapearDelay=700; // delay before menu folds in. how can we implement this into this contribution (Category Box as Nested Unordered List v1.0) as now it is very sensitive so if you move the mouse a little over the edge of the menu the menu folds instant we need to delay this for 1 sec but only the folding of the menu the expansion of the menu should be instant.

 

Hope some one can help

 

I would like to thank the author of this contribution Fantastic menu but I still cannot get it to work with BTS.

 

Thank you in advance

Edited by pcgiant
Link to comment
Share on other sites

  • 4 weeks later...

Nice contrib :D

 

I have a question:

I want the contents in the dropdown to display in line, not as a list.

 

Dont want:

ROOT

SubCat1

SubCat2

SubCat3

 

I want:

ROOT

SubCat1 SubCat2 SubCat3

 

Is there a way to configure this?

Link to comment
Share on other sites

  • 2 weeks later...

Hello, Great contribution.

 

I have STS 4.1 installed on a site and I have your contribution also installed. I was wondering though how I can get that Javascript to work properly so the Flyout works in MSIE? I have it working for all other browsers but for some reason, the Javascript is not being executed properly or something where I have it.

 

When I view the source, the script is showing up in the header, it is just not executing.

 

Can anyone tell me what part of the puzzle that I might be missing here???

Link to comment
Share on other sites

  • 1 month later...

hello all,

 

i have another question, how can i manage to disable empty categories with ul_categories.php?

 

in includes/boxes/categories.php it works fine with the contrib adding this

 

if(!tep_count_products_in_category($categories['categories_id']) == 0){

 

to the wile...

 

but not on ul_categories.php :(

 

any idea?

 

i've tried with 'Enable & Disable Categories' contrib but did not work, and for a lot of categories it would be easier to automatically hide the one's empty...

 

claudia

Link to comment
Share on other sites

  • 2 weeks later...

What a great contribution. I was about to remake a website for a customer, and I though about using the suckerfish css-menu fra alistapart.com. Luckily you made this, so I didn't have to cry to much about mysql selects :P

 

On another note. The first thing my customer complained about, is that inactive categories also showed in the menu. This little change did it:

 

$result = tep_db_query('select c.categories_id, cd.categories_name, c.parent_id from ' . TABLE_CATEGORIES . ' c, ' . TABLE_CATEGORIES_DESCRIPTION . ' cd where c.categories_status = "1" and c.categories_id = cd.categories_id and cd.language_id="' . (int)$languages_id .'" '.$parent_query.' order by sort_order, cd.categories_name');

 

where I added

c.categories_status = "1"

 

I found it in coolmenu.php (the former solution on the site).

Edited by broeman
Link to comment
Share on other sites

  • 2 months later...

On my site the last <li> dosn't get closed for some reason. Can anyone shed any light on this? I'm trying to get my site to validate as XHTML strict and this is the last error I have for my home page.

 

Link to comment
Share on other sites

  • 2 weeks later...
On my site the last <li> dosn't get closed for some reason. Can anyone shed any light on this? I'm trying to get my site to validate as XHTML strict and this is the last error I have for my home page.

 

For me this has done the trick - just in case anyone else has similar prob.

 

	// Close off nested lists
for ($nest = 0; $nest <= $GLOBALS['this_level']; $nest++) {
  if ($nest == '1') { $output .= '</li>'; } // my change
	$output .= '	</ul>';
	}		 
return $output;

Link to comment
Share on other sites

  • 2 weeks later...

How can I modify this to show the manufacturers instead of the subcategories?

 

For instance:

 

CAT 1 --> Sub 1 --> Sub 2

CAT 2 --> Sub 1 --> Sub 2

CAT 3 --> Sub 1 --> Sub 2

 

Change to:

 

CAT 1 --> Manufacturer 1 --> Man 2

CAT 2 --> Manufacturer 1 --> Man 2

CAT 3 --> Manufacturer 1 --> Man 2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...