Zen Cart Logo
Forums / General Questions / Category Hierarchy List?

Category Hierarchy List?

Locked

Views: 1,611

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
29 Feb 2008, 6:58 PM
#1
enigmabomb avatar

enigmabomb

New Zenner

Join Date:
Jan 2008
Posts:
49
Plugin Contributions:
0

Category Hierarchy List?

Is there a program or function that exists (I realize i will probably end up writing my own, but whatever) that I can use to create a category hierachy out of text ? For example, I want:

Top 0
Cat 30
Cat 94
Cat 29
Cat 100
Cat 23
Cat 231
Cat 232
Cat 248
Cat 293
Cat 982
Cat 24

If anyone has some code for this, it'd be greatly appreciated.

Josh

29 Feb 2008, 7:00 PM
#2
enigmabomb avatar

enigmabomb

New Zenner

Join Date:
Jan 2008
Posts:
49
Plugin Contributions:
0

Re: Category Hierarchy List?

I put tabs in between those so it made a list... but it didnt work.

Let;s try again

Cars 20

Audi 34

Mercedes 73

Volkswagon 12

...
......

.......

and on down the line.

29 Feb 2008, 8:51 PM
#3
enigmabomb avatar

enigmabomb

New Zenner

Join Date:
Jan 2008
Posts:
49
Plugin Contributions:
0

Re: Category Hierarchy List?

For anyone curious....

<?php
include_once("includes/application_top.php");
$Cats = array();
//zen_get_categories($categories_array = '', $parent_id = '0', $indent = '')$
$Cats = zen_get_categories($Cats,0,"\t\t");
foreach($Cats as $Cat)
{
	echo "<FONT COLOR=RED>";
	foreach($Cat as $C)	
	{	
		echo "<FONT COLOR =BLACK>";
		print_r($C);
	}
	echo "<br>";			
}
?>