Page 3 of 7 FirstFirst 12345 ... LastLast
Results 21 to 30 of 70
  1. #21
    Join Date
    Nov 2005
    Posts
    101
    Plugin Contributions
    0

    Default Re: Parent Categories Separated In 3 sideboxes

    i got it working....Yay....it was my bad i was playing around with the document type trying to clone it for duplicating the sideboxes and i set the category to restrict to only the document box.
    it works perfectly, it will be time consuming adding all categories this way, as i have hundreds of them but i don't care it works*L*


    thank you so much for all your help, its more appreciated then you will ever know. im so excited this is working

  2. #22
    Join Date
    Nov 2005
    Posts
    101
    Plugin Contributions
    0

    Default Re: Parent Categories Separated In 3 sideboxes

    ok so once again i jumped the gun, it works perfectly in the original categories sidebox but it wont work in the cloned sideboxes. it shows the sidebox but its empty. i named the other categories sidexboxes
    tpl_categories2.php,tpl_categories3.php and tpl_categories4.php

    im thinking maybe i need to change file name or something like this, im just not sure what

    im going to work on it and see what i can do but if you or anyone has a clue i would love to hear it.
    here is the site incase you need to see it.

    i named the original categoreis box to adult the one that is not working is pets which is tpl_categories2.php

    http://www.gothenaturalway.com

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

    Default Re: Parent Categories Separated In 3 sideboxes

    As you probably already found and corrected, this code
    PHP Code:
    $cPTest $box_categories_array[$i]['path'];
        if ((
    $cPTest == 'cPath=3') or ($cPTest == 'cPath=7') or($cPTest == 'cPath=7_25')) } 
    has a typo: the last } is supposed to be a {.

    I'm afraid I can't help with the cloned files, as far as any changes that have to be made. I can only give one speculation or question: does the first executed box reset some info so it is not available to others? or does the last one overwrite what previous ones have done?
    Good luck, and I'll be watching for developments.

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

    Default Re: Parent Categories Separated In 3 sideboxes

    yes i did catch the type, thanks alot.

    yeah i dont even know how to go about finding out if the first executed box resets some info so it is not available to others or if the last one overwrites what previous ones have done. i know its a cloning issue, as far as i know i have cloned right i have done this many times before, but there is something stopping the changes in all the other category sideboxes. if anyone has a clue i would love to hear it.

    Glenn thanks so much for all your help.

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

    Default Re: Parent Categories Separated In 3 sideboxes

    Working on a similar project, I just realized that I had neglected to check my syntax against the example in tpl_main_page.php when I knew the same method was used there.
    PHP Code:
        if(in_array(str_replace("cPath=","",$box_categories_array[$i]['path']), explode(",",'3,21,21_57'))) { 
    does work correctly; the numbers need to be in one string with comma separators, not individual strings. Doh!
    That should make your selection statements easier to write and read.

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

    Default Re: Parent Categories Separated In 3 sideboxes

    Ohhhhhhh i could just kiss you

    thank you thank you thank you. That not only makes adding the cats so much easier it also fixed the problem with the cloned sideboxes, it must have been the syntax that was off making the clones not work.

    i cant thank you enough for all your help, it was very nice of you to waste so much time helping me.

  7. #27
    Join Date
    May 2007
    Posts
    41
    Plugin Contributions
    0

    Default Re: Parent Categories Separated In 3 sideboxes

    I followed these instructions and I can get it to work if I am linking to a top category, but if I am linking to a subcategory (example 141_145) it doesn't seem to work. Has anyone been able to get this to work for linking to subcategories?

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

    Default Re: Parent Categories Separated In 3 sideboxes

    I'm not sure at first glance why this wouldn't be working for you, but I do have two comments:

    (off topic) From view source, you are missing a closing > in this img tag on your home page:
    HTML Code:
    <a href="http://www.fatvanish.com" target="_blank"><img src="images/frontpagefatvanish.gif" width="220" height="276" alt="Learn How to Lose Weight (Fat) at www.FatVanish.com"</a></center>
    The way you have your multiple category boxes arranged and styled, you could achieve the exact same effect with Categories Dressing using non-linked headings, and much less coding.


    For the multiple boxes:
    Can you post the line where you test for cPaths to display? I presume you are using a version of this
    PHP Code:
         if(in_array(str_replace("cPath=","",$box_categories_array[$i]['path']), explode(",",'3,21,21_57'))) { 

  9. #29
    Join Date
    May 2007
    Posts
    41
    Plugin Contributions
    0

    Default Re: Parent Categories Separated In 3 sideboxes

    Quote Originally Posted by gjh42 View Post
    I'm not sure at first glance why this wouldn't be working for you, but I do have two comments:

    (off topic) From view source, you are missing a closing > in this img tag on your home page:
    HTML Code:
    <a href="http://www.fatvanish.com" target="_blank"><img src="images/frontpagefatvanish.gif" width="220" height="276" alt="Learn How to Lose Weight (Fat) at www.FatVanish.com"</a></center>
    Thanks for that info. I have now fixed that.

    Quote Originally Posted by gjh42 View Post
    The way you have your multiple category boxes arranged and styled, you could achieve the exact same effect with Categories Dressing using non-linked headings, and much less coding.
    I never even looked into this. I just found this post and it looked like it would accomplish what I was looking for, so that's what I did. Out of curiousity, would there be a way using either the methods discussed in this thread, or with the categories dressing mod to have a category link directly to a different website? Underneath our Diet & Exercise Routines heading, I would like to have a category called "Muscle Building Program" that links to MuscleNOW.com (opening in a new window), and "Weight Loss Program" that links to FatVanish.com (also opening in a new window) instead of linking to a page within Zencart. Is there a way I could do this considering I'm pretty limited in PHP knowledge?

    Quote Originally Posted by gjh42 View Post
    For the multiple boxes:
    Can you post the line where you test for cPaths to display? I presume you are using a version of this
    PHP Code:
         if(in_array(str_replace("cPath=","",$box_categories_array[$i]['path']), explode(",",'3,21,21_57'))) { 
    Below is that code:

    PHP Code:
    if(in_array(str_replace("cPath=","",$box_categories_array[$i]['path']), explode(",",'81,69,156,66'))) { 

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

    Default Re: Parent Categories Separated In 3 sideboxes

    The select part is simple - you are not asking for the subcategories to be displayed:

    explode(",",'81,69,156,66')

    This will display top categories 81, 69, 156 and 66, but you also need to specify all of their subcategories individually.
    PHP Code:
    explode(",",'81,81_199,81_200,81_203,69,69_177,69_178,156,156_235,156_236,66,66_212,66_213'
    The code could be reworked to do this automatically, but I didn't get into that at the time since the original code worked.

 

 
Page 3 of 7 FirstFirst 12345 ... 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