What are you attempting to do with this?Hi, can anyone tell me what bit of coding is needed to add to a file to extract all the subcategories from a particular category.
What is your end goal?
What are you attempting to do with this?Hi, can anyone tell me what bit of coding is needed to add to a file to extract all the subcategories from a particular category.
What is your end goal?
Zen-Venom Get Bitten
I want to have them in a drop down menu, and be4 anyone says try this mod
http://www.zen-cart.com/index.php?ma...oducts_id=1448
this is no good for what i want to do, as i do not want all the categories across the top, just some of them and also want other links in there like like help, contact us etc..
can any one help???
this is no good for what i want to do, as i do not want all the categories across the top, just some of them
I guess you either changed your mind or mis-posted initially....Hi, can anyone tell me what bit of coding is needed to add to a file to extract all the subcategories from a particular category.
At any rate, most use parts of default code and as such get them all and is dynamic so that when added to it captures those also.
There are others that combine what you later state you want but all cats in the free software addons that do not spring board on native cat-tabs display
Zen-Venom Get Bitten
Think you must have understood what am after..... I want all the subcategories from some of my main categories to show, but i do not want all my main categories across the top of my site.
so lets say i have 10 main categories but i only want 5 of them main categories across the top and when scrolled over the sub categories for that category display as a drop down.
I already no how to do the drop down, i just don't no what coding to use to display the subcategories for that category.
there must be a way of putting some PHP code in there using the main category number that then displays the subcategories for that category, i just dont no how to do this.
hope yous are understanding what it is am asking......
There are two addons that already do similarly:
http://www.zen-cart.com/index.php?ma...products_id=75
http://www.zen-cart.com/index.php?ma...roducts_id=479
Instead of just saying they won't help because they show all categories, if you study them you'll see the categories_ul_generator class, which shows you exactly how to pull the child categories from each desired top-level category.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
you say "if you study them you'll see the categories_ul_generator class, which shows you exactly how to pull the child categories from each desired top-level category"
but i have looked at them and can not find what it is i need to add the pull the child categories that is why i opened this thread to see if anyone new what part it is. as i have looked and tried things but nothing worked.
looks like it will have to be hard coded![]()
it builds a list of all categories and subcategories, starting with the children of "0" which is the very top level category in ZC v1.x.x.
For 4 specific categories that would mean you would just call it 4 times, each time feeding it the category number you want it to return results for.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
But you only remarked on this one....Originally Posted by paddy_uk2007
Post the ul code you can not figure out & where it came fromOriginally Posted by paddy_uk2007
Zen-Venom Get Bitten
This is very confusing....
If you only want 5 categories to be shown, then why create 10?so lets say i have 10 main categories but i only want 5 of them main categories across the top and when scrolled over the sub categories for that category display as a drop down.
If this is how you want to do it - then why not just hard code it into the header - you will hVe to update it manually of course, but that is probably the fastest way to do it...?
It sounds like it would be very hard to do via the existing database format....
Jill || I Love Zen Cart Templates || 2 Dogs Design
I Love To Help But Let's Keep It Public Please To Help Others!
because the side box will also be on some pages that will display all the categories, I didnt want to hard code it as it means always updating it when i have new products/ new sub cats and is products sell out etc... but looks like this is the only option
well anyways doesn't look like this is possible, but thanks everyone for your input
;)