Page 1 of 7 123 ... LastLast
Results 1 to 10 of 70
  1. #1
    Join Date
    Nov 2005
    Posts
    101
    Plugin Contributions
    0

    Default Parent Categories Separated In 3 sideboxes

    hi everyone im hoping this can be done and easily. i have been searching for a while but have come up with nothing. i found one older post about this but there were no answers so i figured i would give it a shot. i would like to have three category sideboxes one for adults, children and teens. and in each of these side boxes i would like to have the appropriate categories.

    is this possible?

    thanks for looking

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Parent Categories Separated In 3 sideboxes

    Easy is a nebulous term??? You would need to clone/duplicate the /includes/modules/sideboxes/categories.php and the associated /includes/templates/template_default/sideboxes/tpl_categories.php files along with the names files etc and edit these to only display the category that you want and be titled as you want.

    This should all be accomplished using the override system to preserve your hard work.
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Nov 2005
    Posts
    101
    Plugin Contributions
    0

    Default Re: Parent Categories Separated In 3 sideboxes

    perfect, thanks so much i should be able to do that*L* i have cloned other files so it should not be to hard. appreciate the reply

  4. #4
    Join Date
    Nov 2005
    Posts
    101
    Plugin Contributions
    0

    Default Re: Parent Categories Separated In 3 sideboxes

    sorry one more question ..... i duplicated the sideboxes just fine but how do i specify which category to show in which sidebox?

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Parent Categories Separated In 3 sideboxes

    Duping the boxes is the easy part - defining what needs to be in the box on a dynamic basis becomes a bit more complicated and I have not done this as you are trying to but...

    /includes/functions/functions_categories.php I believe is what populates this box
    but it mat be the tpl that grabs this and can be adjusted most simply
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Nov 2005
    Posts
    101
    Plugin Contributions
    0

    Default Re: Parent Categories Separated In 3 sideboxes

    thanks alot i will give it a go, im sure i will figure it out
    i appreciate the help

    cara

  7. #7
    Join Date
    Nov 2005
    Posts
    101
    Plugin Contributions
    0

    Default Re: Parent Categories Separated In 3 sideboxes

    ok so i think i got myself into more then i can handle*L*.
    i though this would be easier, but i think im going to have to do to much coding to figure this out and im just not good enough with php to do that. im going to look at this a little more but from what i saw in functions_categories.php it looks pretty hard.

    if you or anyone has an advice or thoughts on how to go about this they will be of great help, in the mean time im going to see what i can do.

    thanks again

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Parent Categories Separated In 3 sideboxes

    I did a mod to insert another breakline between some of my categories, checking the category id to put it in the right place. You could do a similar thing, screening the current cat being added against a list and skipping it if it is not on the list. This would require editing the code if you add any categories, but it wouldn't be difficult.

    I am away from my regular computer so can't give any more info at the moment, but if you still need help I can post later tonoght. (The file wasn't in /functions, but I can't remember which one it was right now.)

  9. #9
    Join Date
    Nov 2005
    Posts
    101
    Plugin Contributions
    0

    Default Re: Parent Categories Separated In 3 sideboxes

    if you have the time i would love some help later, im going to work on it now for a while and see if i can figure anything out. but i would defiantly appreciate some more info if you dont mind.

    thanks so much for you help

  10. #10
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Parent Categories Separated In 3 sideboxes

    In /includes/templates/your_template/sideboxes/tpl_categories.php, the categories display list is built with a for loop starting about line 14:

    for ($i=0;$i<sizeof($box_categories_array);$i++) {

    There are a lot of if tests inside this to determine characteristics of the display, and a switch which is intended to customize individual category line appearance. This switch code can be used in another if test as I did:

    //lay a separator between collections and types - gjh42 20070222
    if ($box_categories_array[$i]['path'] == 'cPath=81') {
    $content .= '<hr id="catBoxDivider2" />' . "\n";
    }

    You can use this test immediately after the for loop start (say line 15) with its closing } just before the

    }

    if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or...

    around line 59. This will evaluate whether or not the category should be displayed before determining how to display it.

    For your purpose, I suggest something like this (replacing the cPaths with yours):

    PHP Code:
      for ($i=0;$i<sizeof($box_categories_array);$i++) {
        
    /* test for cats to display */
        
    if ($box_categories_array[$i]['path'] ==('cPath=3' or 'cPath=7' or 'cPath=7_25' or 'cPath=7_26' or 'cPath=12')) {

    /* many lines of existing code */

        
    /* add this */
     
    }

    if (
    SHOW_CATEGORIES_BOX_SPECIALS == 'true' or... 
    If the cPath being evaluated is not in this list, it will not be displayed in this sidebox. For the simplest use, it will be necessary to mention every subcategory cPath as well as top cats.

    If you have a lot of subcats this could get cumbersome. In this case it will be possible to evaluate for just the topcat id, but will be more complicated. The way I did it for another purpose won't exactly work here, and I would have to think a while to figure a good way to do it.

    Let me know how this works for you.

 

 
Page 1 of 7 123 ... LastLast

Similar Threads

  1. Category Filter - Display Parent categories
    By djdavedawson in forum General Questions
    Replies: 1
    Last Post: 5 Oct 2010, 10:08 PM
  2. Subcategories products in Parent Categories
    By fightthefourwalls in forum Setting Up Categories, Products, Attributes
    Replies: 21
    Last Post: 14 Jun 2010, 07:58 PM
  3. Enable Links for Parent Categories in Categories Sidebox
    By MrsQ in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 11 Sep 2009, 08:25 PM
  4. Parent... Child... Sub.... CATEGORIES
    By eliza-bee in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 12 May 2009, 03:03 PM
  5. Parent categories in dropdown filter
    By Ben in forum Customization from the Admin
    Replies: 3
    Last Post: 15 Aug 2006, 02:38 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR