Forums / All Other Contributions/Addons / Simple Category Tree

Simple Category Tree

Views: 97,118

Results 61 to 80 of 249
15 Mar 2008, 6:05 AM
#61
fightthefourwalls avatar

fightthefourwalls

New Zenner

Join Date:
Nov 2007
Posts:
57
Plugin Contributions:
0

Simple Category Tree

Sorry false alarm... My "New Products for March" title went walkabouts and at the same time turned on new products listing on... and not having sleep for the past week or two made me get excited and believed it was what we were after.

However seeing that the new products listing followed the categories all the way down means that we should be able to steal some code from there then take out the function that asks if the product is new and replace our main listing with it so it digs out to the deepest categories. Possible?

17 Mar 2008, 11:57 PM
#62
fightthefourwalls avatar

fightthefourwalls

New Zenner

Join Date:
Nov 2007
Posts:
57
Plugin Contributions:
0

Re: Simple Category Tree

Any help with that code yellow1912? :smile: It's been about a week and a half...

18 Mar 2008, 8:58 AM
#63
danp avatar

danp

New Zenner

Join Date:
Mar 2008
Posts:
32
Plugin Contributions:
0

Re: Simple Category Tree

Hi, I am building my first zen cart and am learning loads. Yellow1912, I have been playing around with your contrib. and it's great, thanks!.
I have been trying to display ONLY the first sub-cat level all the time in the header using :

$_SESSION['category_tree']->build_category_string('ul', 'li', '', $_GET['cPath']{0}, 0)

But get the next level with it expanded also. Any way of just giving the first sub-cats only after selection of top cat elsewhere on the page?
I have also tried:
$_SESSION['category_tree']->build_category_string('ul', 'li', '', $_GET['cPath']{0}, 1)

Thanks, DanP

p.s. I am also looking forward to script for 'list all products under category selected'

19 Mar 2008, 5:25 AM
#64
noella avatar

noella

New Zenner

Join Date:
Oct 2005
Posts:
71
Plugin Contributions:
0

Re: Simple Category Tree

I've been trying to find a way to display only the subcategories in the sidebox of the corresponding Parent Categories when that Category is selected on the Horizontal Tab. I thought I got it working until I clicked on the other categories but it still displays Subcategories of the First category instead of its own.

I have this code in the Category Sidebox template:

$content .= $_SESSION['category_tree']->build_category_string('', 'li', '<br />', 1, 1);

19 Mar 2008, 7:16 PM
#65
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple Category Tree

Display all sub cat products module included !!!

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

19 Mar 2008, 7:44 PM
#66
focus360 avatar

focus360

New Zenner

Join Date:
May 2006
Posts:
76
Plugin Contributions:
0

Re: Simple Category Tree

Wooooo hooo. :bigups:

I think the number of Zenners this will help may be underestimated. Ive been looking for this for over a year!

I will give this a try first thing in the morning.

THANKS SO MUCH!!!!

19 Mar 2008, 9:19 PM
#67
bindaaz avatar

bindaaz

New Zenner

Join Date:
Mar 2008
Posts:
14
Plugin Contributions:
0

Re: Simple Category Tree

Thank you soooo much for your great effort. Was looking for it for quite some time. I tried it and it works. The only thing was that I had to add a space after the 'select distinct' statement in the index_filters/default_filter.php.

I:clap::clap:

20 Mar 2008, 2:08 AM
#68
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple Category Tree

Noella:

I've been trying to find a way to display only the subcategories in the sidebox of the corresponding Parent Categories when that Category is selected on the Horizontal Tab. I thought I got it working until I clicked on the other categories but it still displays Subcategories of the First category instead of its own.

I have this code in the Category Sidebox template:

$content .= $_SESSION['category_tree']->build_category_string('', 'li', '<br />', 1, 1);
Oh, first, if you use li for the the child then you need to use ul for the parent cats.
Also, if you need to display subcats of the current cat you need to pass that parent cat id into it *using $cPath or $_GET['cPath']

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

20 Mar 2008, 2:14 AM
#69
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple Category Tree

DanP:

Hi, I am building my first zen cart and am learning loads. Yellow1912, I have been playing around with your contrib. and it's great, thanks!.
I have been trying to display ONLY the first sub-cat level all the time in the header using :

$_SESSION['category_tree']->build_category_string('ul', 'li', '', $_GET['cPath']{0}, 0)

But get the next level with it expanded also. Any way of just giving the first sub-cats only after selection of top cat elsewhere on the page?
I have also tried:
$_SESSION['category_tree']->build_category_string('ul', 'li', '', $_GET['cPath']{0}, 1)

Thanks, DanP

p.s. I am also looking forward to script for 'list all products under category selected'
This $_GET['cPath']{0} looks weird, im pretty sure it is wrong.
Try this:
$_SESSION['category_tree']->build_category_string('ul', 'li', '', $_GET['cPath'], 1, false, true);

Also, make sure that you use an if statement to make it appears only if $_GET['cPath'] exists.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

20 Mar 2008, 5:25 PM
#70
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple Category Tree

Fixed a few bugs with displaying all sub products.
For those who already installed it, simply over-write the default_filter.php

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

20 Mar 2008, 10:53 PM
#71
danp avatar

danp

New Zenner

Join Date:
Mar 2008
Posts:
32
Plugin Contributions:
0

Re: Simple Category Tree

yellow1912:

This $_GET['cPath']{0} looks weird, im pretty sure it is wrong.
Try this:
$_SESSION['category_tree']->build_category_string('ul', 'li', '', $_GET['cPath'], 1, false, true);

Also, make sure that you use an if statement to make it appears only if $_GET['cPath'] exists.

Ah, yes. What I needed is combination of mine and yours, i.e.

$_SESSION['category_tree']->build_category_string('ul', 'li', '', $_GET['cPath']{0}, 1, false, true)

The $_GET['cPath']{0} returns the Top cPath only depending on which one was selected and your $include_root=false, $strict=false appears to work. ie. Allows a specific level of the subcat structure to appear constantly, from there another context driven menu appears elsewhere.

Thanks again.
DanP

21 Mar 2008, 12:28 PM
#72
skipper_2 avatar

skipper_2

New Zenner

Join Date:
Sep 2007
Posts:
48
Plugin Contributions:
0

Re: Simple Category Tree

Hi,

Have installed the mod, done all the file edits but for some reason nothing happens, don't know if anyone can shed any light on this as I really need it to work to open up the mobile accessories category. URL is http://www.mobiles-r-us.net

Thanks
Paul

21 Mar 2008, 4:38 PM
#73
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple Category Tree

What do you mean? Where did you put the code? If you put it in a new sidebox, did you turn it on via admin?

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

21 Mar 2008, 6:17 PM
#74
skipper_2 avatar

skipper_2

New Zenner

Join Date:
Sep 2007
Posts:
48
Plugin Contributions:
0

Re: Simple Category Tree

Hi,
I just uploaded the files as in the readme and nothing happened so I followed step 3 and did the file edits but still nothing, I thought they would display in the categories sidebox. Do I have to put the files in a different location? sorry if I sound dull but I thought I followed the instructions as it said.

Thanks
Paul

21 Mar 2008, 8:32 PM
#75
skipper_2 avatar

skipper_2

New Zenner

Join Date:
Sep 2007
Posts:
48
Plugin Contributions:
0

Re: Simple Category Tree

Hi again, I have just realised that when I click on any link in the categories sidebox it brings up blank pages, not sure why that would happen. Any ideas please I would love to be able to get this working.

Thanks
Paul

21 Mar 2008, 11:14 PM
#76
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple Category Tree

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

22 Mar 2008, 12:04 AM
#77
skipper_2 avatar

skipper_2

New Zenner

Join Date:
Sep 2007
Posts:
48
Plugin Contributions:
0

Re: Simple Category Tree

Hi Yellow,
thanks for the advice, after following the instructions the debug log gives me this
[22-Mar-2008 00:01:20] PHP Fatal error: Call to undefined method simple_categories_tree::retrieve_deepest_level_children() in /mobiles-r-us.net/user/htdocs/includes/modules/pages/index/header_php.php on line 21

Do you know what I should do next?

22 Mar 2008, 12:30 AM
#79
skipper_2 avatar

skipper_2

New Zenner

Join Date:
Sep 2007
Posts:
48
Plugin Contributions:
0

Re: Simple Category Tree

Sorry to be a nuisance, updated file as you said, website all working again but not showing any subcategories and now giving me this error [22-Mar-2008 00:15:17] PHP Fatal error: Call to a member function build_deepest_level_children() on a non-object in /mobiles-r-us.net/user/htdocs/includes/modules/pages/index/header_php.php on line 20
any help would be appreciated. Think I am out of my depth with it.

22 Mar 2008, 1:23 AM
#80
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple Category Tree

Is this a test box? It would be faster if I can access it and have a look instead of moving around (in the dark)

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me