PDA

View Full Version : category tree


Andy
20-10-07, 14:22
Hi

Im on with a rebuild, just for fun!!

anyhoo, in category_tree.tpl, by default we display the parent categories and 3 random grandchildren.

If we're browsing the parent category, we display all the children.

Now, instead of this, I want to always display the children of the parents by default. I'll work on the grandchildren once If sussed this out.

So, my problem is this:
I can't get the child categories along with the parents!

I suspect there's gonna have to be some core changes to category_tree.php but not sure yet.

Has anyone else managed to do this before? if so, would you mind giving me a clue, just to save time?

Cheers

Confuscius
20-10-07, 19:45
Hi Andy

Try creating a second copy of the category production file and then call this within the category building loop and pass through the current category for the next look up and repeat for as deep as you want to go - it should work!

I will have a go next week but you are the techie!

Paul

Andy
21-10-07, 19:54
I changed my mind on this. I don't want to rely on SW to create the tree for me, just incase it breaks. Dont want to be left without any site navigation now do I?

So, i copied the category IDs and names out of the Shop window PDF, opened it up as a CSV in open office and created a csv of everything.

inserted all that into a DB and built a db driven category menu, all pretty like!
I'd love to show you it, but it's behind a Mask on my brand spanking new VPS (thanx paul for the hosting tip!)

New problem.

I want a list of category names that each merchant has products in.

eg:
currys -> Electronics, Computers & Software
dixons -> Electronics, Computers & Software, Sports
empire stores -> Electronics, Computers & Software, Clothing & Accessories, Lingerie, Shoes, Sports, Mobile Phones, Home & Garden, Furniture, Garden



I could nick it from the general merchant manager, but that only returns the categories Ive listed above.
however, we all know that currys operate in about 25 different categories, so there must be more to it.

anyone managed this with the api?