Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2008
    Posts
    49
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Jan 2008
    Posts
    49
    Plugin Contributions
    0

    Default 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.

  3. #3
    Join Date
    Jan 2008
    Posts
    49
    Plugin Contributions
    0

    Default Re: Category Hierarchy List?

    For anyone curious....

    PHP Code:
    <?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>";            
    }
    ?>

 

 

Similar Threads

  1. v154 How do I list products in sub category with in the parent category?
    By JoeToys in forum Setting Up Categories, Products, Attributes
    Replies: 38
    Last Post: 2 Dec 2018, 08:54 PM
  2. Overrides hierarchy
    By beasleybub in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 Feb 2011, 01:02 PM
  3. Replies: 2
    Last Post: 30 Jul 2008, 08:35 AM
  4. class hierarchy ?
    By winky3d in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 9 Jul 2007, 09:56 AM
  5. Style category links based on hierarchy?
    By mdonahue37 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 16 Apr 2007, 07:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg