Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2006
    Location
    Michigan
    Posts
    196
    Plugin Contributions
    0

    Default Always expand categories?

    Hello all,

    I doing a little updating to my site and I need some help. In the past whenever there wasn't anything I could figure out I just removed the zen functions and hard coded everything. I did this for my left column that contained all the links to my product categories.

    I did this because I need all the categories to be expanded at all times. I'm pretty sure there has to be an easy way to accomplish this but I have yet to find it. If anyone has any suggestions I would greatly appreciate it.

    Thank you,
    mdk

  2. #2
    Join Date
    Jun 2006
    Location
    Michigan
    Posts
    196
    Plugin Contributions
    0

    Default Re: Always expand categories?

    Ok I'm doing a bit of digging to see if I can figure this out on my own. So far I am overriding categories.php and tpl_categories.php.

    categoies.php loads all the top-level cats into an array and then tpl_categories outputs this array.

    When you enter a category page does it use a different sidebox to display the categories?

  3. #3
    Join Date
    Jun 2006
    Location
    Michigan
    Posts
    196
    Plugin Contributions
    0

    Default Re: Always expand categories?

    Ok it appears that the array which holds the categories is a different size depending upon which page you are on. Although it appears that the database call is the same for each page.

    There must be something else going on with the db.

  4. #4
    Join Date
    Apr 2007
    Posts
    40
    Plugin Contributions
    0

    Default Re: Always expand categories?

    http://www.zen-cart.com/index.php?ma...4a1de18512f704

    This may be what you are looking for.

  5. #5
    Join Date
    Jul 2006
    Posts
    308
    Plugin Contributions
    0

    Default Re: Always expand categories?

    I believe that mod doesn't show the expanded category list correctly.

    See this thread: http://www.zen-cart.com/forum/showth...ories+expanded

  6. #6
    Join Date
    Apr 2007
    Posts
    40
    Plugin Contributions
    0

    Default Re: Always expand categories?

    Here is the correct link we used to have cats and sub cats expanded on all pages.

    [FONT=Times New Roman]http://www.zen-cart.com/forum/showpo...9&postcount=17[/FONT]

  7. #7
    Join Date
    Jul 2006
    Posts
    308
    Plugin Contributions
    0

    Default Re: Always expand categories?

    Ok, I've tried the ch_category mod and it does seem to work fine. Someone just posted recently describing how it wasn't creating the tree correctly, but I don't see a problem.

    I have more items in the Documents menu that also need to be expanded, so it looks like I'll need another class file and sidebox menu file. So hopefully I can figure out how to modify a copy of t to pull the products that would normally display in the documents menu, the same way ch_category pulls the products that are normally displayed in the categories menu.

  8. #8
    Join Date
    May 2010
    Posts
    2
    Plugin Contributions
    0

    Default Re: Always expand categories?

    I know this thread is 3 years old, but it's exactly what I am looking for and I can't seem to find any info on how to get the documents categories expanded.

  9. #9
    Join Date
    Aug 2006
    Location
    portlandish, oregon
    Posts
    799
    Plugin Contributions
    0

    Default Re: Always expand categories?

    I actually JUST found out how to do this myself.

    1. I Duplicated the files that came with ch_categories. I just named them:
    ch_categories_tree_generator2.php
    ch_categories2.php

    2. I opened up ch_categories_tree_generator2.php and changed the first line

    class ch_category_tree
    to
    class ch2 _category_tree
    [the part in red is what I added.]

    3. Then I opened ch_categories2.php. Found around the 3rd line:

    $main_category_tree = new ch_category_tree;
    and changed it to:
    $main_category_tree = new ch2_category_tree;
    Then I found my new sidebox in Admin->Layout Boxes Controller. [It was named ch_categories2.php if]

    Finally the Document Categories Expanded to show subcategories.

 

 

Similar Threads

  1. better categories expand
    By lucianman in forum General Questions
    Replies: 0
    Last Post: 30 Jun 2009, 08:56 PM
  2. Categories do not expand
    By WebiWan in forum General Questions
    Replies: 3
    Last Post: 18 Mar 2009, 01:31 AM
  3. Always Expand ONE Sidebox Category
    By DiZZ in forum General Questions
    Replies: 2
    Last Post: 14 May 2008, 06:10 PM
  4. Always expand the categories menu?
    By eger in forum General Questions
    Replies: 0
    Last Post: 8 Jun 2006, 07:30 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