Page 6 of 7 FirstFirst ... 4567 LastLast
Results 51 to 60 of 63
  1. #51
    Join Date
    May 2006
    Posts
    41
    Plugin Contributions
    0

    Default Re: Display Categories In Separate Boxes

    Quote Originally Posted by gjh42 View Post
    No, you do not need to use the separate category mod for this. In fact, the layout you refer to, moreso than your current site state, is exactly what Categories Dressing was originally designed to do: add nice headings at desired places in the categories menu.
    Okay fantastic, i will use the category dressing instead.

  2. #52
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,831
    Plugin Contributions
    31

    Default Re: Display Categories In Separate Boxes

    The current version 1.2 has a problem.

    It uses a variable $name which is unset after the routine..this unsets $name used in the contact us page to pre-populate the name field when a client is logged in.

    I suggest this change from
    PHP Code:
        while (!$categories_ap->EOF)  {
            
    $id $categories_ap->fields['categories_id'];
            
    $name $categories_ap->fields['categories_name'];
              
    $add_content .= '<li><a href="' zen_href_link(FILENAME_DEFAULT'&cPath='.$id) . '">'.$name.'</a></li>' "\n";
            
    $categories_ap->MoveNext();
        }
        
    $add_content .= '</ul>';
    //debug echo $add_content; 
        
    unset($name); 
    to
    PHP Code:
        while (!$categories_ap->EOF)  {
            
    $categories_id $categories_ap->fields['categories_id'];
        
    $categories_name $categories_ap->fields['categories_name'];
        
    $add_content .= '<li><a href="' zen_href_link(FILENAME_DEFAULT'&cPath='.$categories_id) . '"><span class="catSpan">'.$categories_name.'</span></a></li>' "\n";
        
    $categories_ap->MoveNext();
        }
        
    $add_content .= '</ul>';

    //echo $add_content;//debug to check query is ok 
        //unset($categories_name);//was $name but overwrote $name in contact_us 
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  3. #53
    Join Date
    Aug 2012
    Posts
    23
    Plugin Contributions
    0

    Default Re: Display Categories In Separate Boxes

    Will this work with 1.5?

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

    Default Re: Display Categories In Separate Boxes

    It probably will. The files and systems involved are not ones that changed for v1.5.x.

  5. #55
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,831
    Plugin Contributions
    31

    Default cPath incomplete

    I've just noticed that the array that gets used for this produces an incomplete cPath.
    ie if your parent id is 2 and the category is 345, the link goes to 345 instead of 2_345 which will result in incomplete breadcrumbs.

    This is how I fixed it:
    in \includes\modules\sideboxes\YOUR_TEMPLATE\separate_category_sidebox.php

    change
    PHP Code:
    while (!$categories_ap->EOF)  {
            
    $id $categories_ap->fields['categories_id'];
            
    $name $categories_ap->fields['categories_name'];
            
    $add_content .= '<li><a href="' zen_href_link(FILENAME_DEFAULT'&cPath='.$id) . '">'.$name.'</a></li>' "\n";
            
    $categories_ap->MoveNext();
        } 
    to
    PHP Code:
        while (!$categories_ap->EOF)  {
            
    $categories_path zen_get_path($categories_ap->fields['categories_id']);
            
    $categories_name $categories_ap->fields['categories_name'];
            
    $add_content .= '<li><a href="' zen_href_link(FILENAME_DEFAULT'&'.$categories_path) . '"><span class="catSpan">'.$categories_name.'</span></a></li>' "\n";
            
    $categories_ap->MoveNext();
        } 
    Note I have also changed the variable names for clarity and added a css class to the link.
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  6. #56
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,831
    Plugin Contributions
    31

    Default Re: cPath incomplete

    I need to eat the previous post, the "fix" worked at the time but not later, this appears to work consistently:

    PHP Code:
    while (!$categories_ap->EOF)  {
            
    $categories_path zen_get_generated_category_path_rev($categories_ap->fields['categories_id']);//debug echo '$categories_path='.$categories_path.'<br />';
            
    $categories_name $categories_ap->fields['categories_name'];
            
    $add_content .= '<li><a href="' zen_href_link(FILENAME_DEFAULT'&cPath='.$categories_path) . '"><span class="catSpan">'.$categories_name.'</span></a></li>' "\n";
            
    $categories_ap->MoveNext();
        } 
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  7. #57
    Join Date
    Feb 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: cPath incomplete

    Hello,

    I'm building my site and I'm using this mod on my site, but the side-box looks very different to my other template side-box, can someone put me in the right direction to show the information like the other templates side-box.


    Here is my site
    Code:
    http://compuservicesj.com/store/
    Thanks
    Jose

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

    Default Re: cPath incomplete

    Add to your stylesheet
    Code:
    .separatesideboxlist>li {margin-left: -3em; list-style: inside url(../images/bc_info.gif);line-height: 2.0em; border-bottom: 1px dashed #aabbcc;}

  9. #59
    Join Date
    Feb 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: cPath incomplete

    Quote Originally Posted by gjh42 View Post
    Add to your stylesheet
    Code:
    .separatesideboxlist>li {margin-left: -3em; list-style: inside url(../images/bc_info.gif);line-height: 2.0em; border-bottom: 1px dashed #aabbcc;}
    Thanks....

  10. #60
    Join Date
    Feb 2011
    Posts
    14
    Plugin Contributions
    0

    Default Re: cPath incomplete

    I have been using this mod for over a year and love it. I had 4 separate categories set up and working properly. I just added a new category and set it up as the others. I am only getting the heading no products under the heading. I can change the includes/modules/sideboxes/ mytemplate line for and c.parent_id = 20 to another category id and change the separate_category_sidebox_04.php to separate_category_sidebox_03.php, and evey thing works fine. Any help would keep what little hair I have.

 

 
Page 6 of 7 FirstFirst ... 4567 LastLast

Similar Threads

  1. v151 2 Separate Boxes on Different Category Type
    By PanZC2020 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Aug 2016, 09:40 PM
  2. Separate quantity boxes for different attributes
    By ::AnanA:: in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 7 Oct 2008, 02:21 PM
  3. Separate Top Categories from Sub-Categories in Layout?
    By msmith29063 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 22 Feb 2008, 06:56 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