Forums / All Other Contributions/Addons / Simple Category Tree

Simple Category Tree

Views: 97,118

Results 161 to 180 of 249
25 Oct 2008, 2:30 AM
#161
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

Simple Category Tree

Fantastic!

Onto the all_subcats_products, then.

Does this add its functionaliy automatically to an existing tree structure, eg: a successfully implemented my_categories tree once installed?

Obviously I will be checking this out for myself, but it is better to know of anything I should know now, so I (hopefully) don't have to bug you again later!

25 Oct 2008, 2:32 AM
#162
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Simple Category Tree

some name not taken:

Fantastic!

Onto the all_subcats_products, then.

Does this add its functionaliy automatically to an existing tree structure, eg: a successfully implemented my_categories tree once installed?
I'm not really sure what you mean, can you explain it in more details? Sorry, a bit sleepy here.

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

25 Oct 2008, 2:37 AM
#163
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

Re: Simple Category Tree

Well the all_subcats_products allow you maximise the tree, so you can show things right down to the product level, yes?

So, does it just need to be installed or does it need to be installed and configured? - Looking at it it looks like it adds its functionality automatically, once installed, to any existing simple tree structure.

25 Oct 2008, 2:50 AM
#164
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Simple Category Tree

some name not taken:

Well the all_subcats_products allow you maximise the tree, so you can show things right down to the product level, yes?

So, does it just need to be installed or does it need to be installed and configured? - Looking at it it looks like it adds its functionality automatically, once installed, to any existing simple tree structure.
Not really, here is that the module actually does:

We knows that Zen does not show products on category containing sub cats (since that category doesnt actually contains any product)

The module makes use of one of the SCT functionalities to do that.

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

25 Oct 2008, 5:50 AM
#165
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

Re: Simple Category Tree

I see. - Thanks.

I am going to try and put all this (the last page or so!) into place now because I have just reinstalled the cart (again).

Hopefully all will be OK, so I don't have to pester you any further... :D

26 Oct 2008, 6:19 AM
#166
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

Re: Simple Category Tree

The tree is in place (using simple_categories_tree only, at the moment).

It seems that you have to design a box and to code it into define_main_page in order to get it to display in the centercolumn area, otherwise use left or right column boxes. - It cannot be placed as a box in center area unless the left column is enabled in admin, when it can be placed using the single column setting in the Layout Boxes Controller (not for those who don't know :D ).

The problem I am having, though, is that it will not retrieve deepest_level_children. In fact it won't even match the default display shown by the default Zen Cart categories box.

I have tried all kinds of variations on the code snippets from the readme file and cannot even get it to generate an error so I know where I am going wrong!

I am fairly certain that the problem is something simple, like nested brackets or full statements that can be appended and don't need to be stated in full, so I was wondering if you could you provide a complete string with all variables or some sample strings, please, so I can check my syntax?

26 Oct 2008, 6:21 AM
#167
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Simple Category Tree

some name not taken:

The tree is in place (using simple_categories_tree only, at the moment).

It seems that you have to design a box to place for it and to code it into define_main_page in order to get it to display in the centercolumn area, otherwise use left or right column boxes.

The problem I am having, though, is that it will not retrieve deepest_level_children. In fact it won't even match the default display shown by the default Zen Cart categories box.

I have tried all kinds of variations on the code snippets from the readme file and cannot even get it to generate an error so I know where I am going wrong!

I am fairly certain that the problem is something simple, like nested brackets or full statements that can be appended and don't need to be stated in full, so I was wondering if you could you provide a complete string with all variables or some sample strings, please, so I can check my syntax?
I believe that the function to retrieve deepest levels is only available in the newer version of the module, which is included in the all sub cats products package.

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

26 Oct 2008, 6:25 AM
#168
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

Re: Simple Category Tree

Ah, ... I'll check that out. - Thanks.

I'm just trying to get a full tree using a few test categories and products so I can do the design work for the tree without discovering something 'orrible later on that I have missed when the site is live.

26 Oct 2008, 6:29 AM
#169
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

Re: Simple Category Tree

some name not taken:

(not for those who don't know :D ).

That should have read note...

26 Oct 2008, 6:33 AM
#170
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

Re: Simple Category Tree

Hmmm... all_subcats_products is not doing anything for me. - I'm still stuck with the three basic categories that won't expand to show the products, ie: a fully expanded tree.

I figure that this should work:

<?php
$content = '';
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 0, 2), $categories_id = 0, retrieve_categories_tree_array(), build_deepest_level_children(), 

retrieve_deepest_cats_array($categories_1, $categories_2, $categories_3);
?>
26 Oct 2008, 6:50 AM
#171
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

Re: Simple Category Tree

The debug utility is telling me

[25-Oct-2008 23:46:12] PHP Parse error: syntax error, unexpected T_VARIABLE in /home/litez/public_html/includes/templates/template_default/sideboxes/tpl_my_categories.php on line 3

with the following (amended) code

<?php
$content = '';
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 0, 2) $categories_id = 0 retrieve_categories_tree_array() build_deepest_level_children() 

retrieve_deepest_cats_array($categories_1, categories_2, categories_3);
?>
26 Oct 2008, 7:14 AM
#172
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

Re: Simple Category Tree

There seems to be only two variations of simple_category_tree that will work, even with all_subcats_products installed, and both are as listed in the readme and sample files:

<?php
$content = '';
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 0, 2);
?>

(unordered list version)

<?php
$content .= $_SESSION['category_tree']->build_category_string($parent_tag = 'div', $child_tag = 'span', $divider = '', $categories_id = 0, $max_level = 9, $include_root = 

false, $strict = false)
?>

(flat line version)

neither gives a fully expanded tree, and the additional variables (help file) do not seem to change anything.

Personally, I'm a little puzzled..

26 Oct 2008, 7:21 AM
#173
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Simple Category Tree

Why do you call a class method that way?
// call this first to build the children, and a class method has to be called like this

$_SESSION['category_tree']->build_deepest_level_childrenCOLOR=#007700 ;

[/COLOR]$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 0, 2);

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

26 Oct 2008, 7:24 AM
#174
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Simple Category Tree

Also. this is clearly very very wrong:

$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 0, 2) $categories_id = 0 retrieve_categories_tree_arrayCOLOR=#007700
build_deepest_level_childrenCOLOR=#007700

  1. You can not call a class method without using the object
  2. [/COLOR][/COLOR]$categories_id = 0 retrieve_categories_tree_arrayCOLOR=#007700 build_deepest_level_childrenCOLOR=#007700
    Something like this will of course give you a bunch of errors
    [/COLOR][/COLOR]

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

26 Oct 2008, 7:31 AM
#175
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

Re: Simple Category Tree

OK, thanks, but now I have lost the main page and have no footer, with the error

[26-Oct-2008 00:30:29] PHP Parse error: syntax error, unexpected T_VARIABLE in /home/litez/public_html/includes/templates/template_default/sideboxes/tpl_my_categories.php on line 3

:smile:

The sticking point is trying to pesuade the code to put a fully expanded tree into an unordered list. - I just cannot get the syntax right...

26 Oct 2008, 7:33 AM
#176
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Simple Category Tree

Which means you have a syntax error on that line :), and since I cant see that line I dont know what it is.

some name not taken:

OK, thanks, but now I have lost the main page and have no footer, with the error

:smile:

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

26 Oct 2008, 7:36 AM
#177
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

Re: Simple Category Tree

<?php
$content = '';
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 0, 4) $build_deepest_level_children() ;
?>

I am trying to build a fully expanded tree in unordered list format, but I keep screwing up the syntax.

26 Oct 2008, 7:38 AM
#178
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Simple Category Tree


$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 0, 4) $build_deepest_level_childrenCOLOR=#007700 ;

Why do you have this: [/COLOR]$build_deepest_level_childrenCOLOR=#007700?

Please read the example I posted above

Regards
[/COLOR]

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

26 Oct 2008, 7:43 AM
#179
some_name_not_taken avatar

some_name_not_taken

Zen Follower

Join Date:
Sep 2008
Posts:
106
Plugin Contributions:
0

Re: Simple Category Tree

Yes, sorry, - getting there now...

<?php
$_SESSION['category_tree']->build_deepest_level_children() ;
$_SESSION['category_tree']->retrieve_cpath() ;
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 0, 2); 
?>

It's still not doing what I want, but I think this is how it should be.

26 Oct 2008, 7:44 AM
#180
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Simple Category Tree

What are you trying to do?> some name not taken:

Yes, sorry, - getting there now...

<?php $_SESSION['category_tree']->build_deepest_level_children() ; $_SESSION['category_tree']->retrieve_cpath() ; $content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 0, 2); ?>

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