Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Help with coding

    I am displaying all subcategories products on the main category page using simple category tree.

    But I want to also display the names of the subcategories.

    I have done this using the following code:
    Code:
    <?php
        $sub_cats = $_SESSION['category_tree']->build_category_string('', '', '&nbsp;|&nbsp;', $cPath, 1, false, true);
        
        if ($sub_cats != "") {
           echo $sub_cats;
        }
    ?>
    it shows the list of subcategories but without a break. Any Ideas?

    Also I need to include a statement that will hide if category has no subcategories.

    Any help would be greatly appreciated.

  2. #2
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Help with coding

    I figured out how to display the categories as a list :-)

  3. #3
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Help with coding

    ok so I just piggy backed off the "if" statement already in the code with an else statement to display "Sorry, this category has no subcategories."

    This is a test template I am working on but you can see what I was trying to accomplish by clicking here

 

 

Similar Threads

  1. Problems with Numinex Mod, can somebody help me with coding...
    By strugglingnovice in forum General Questions
    Replies: 5
    Last Post: 23 Sep 2013, 05:42 AM
  2. Help with Coding Issues
    By karenkte in forum General Questions
    Replies: 2
    Last Post: 28 Dec 2012, 09:25 PM
  3. Coding Help with require(DIR_WS_MODULES
    By haredo in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 27 Apr 2009, 10:48 AM

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