Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12
  1. #11
    Join Date
    Jan 2007
    Posts
    35
    Plugin Contributions
    0

    Default Re: adding description to category listing

    Quote Originally Posted by Ajeh View Post
    What version of Zen Cart are you using?
    I am using Zen Cart 1.3.7

    Just found the solution to the big question above:

    To get category description directly use something like this:
    zen_get_category_description($categories->fields['categories_id'],'1')

    The first parameter is the category id (Surprise!)
    The second parameter is your desired language ID.


    So, line 39 of my new category_row.php now looks like this:

    $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
    'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<div class="category-name">' . $categories->fields['categories_name'] . '</div class="category-name"></a>'.'<div class="category-description">' .zen_get_category_description($categories->fields['categories_id'],'1') . '</div class="category-description">');

    And I get category descriptions in the list of categories - exactly what I (and others) wanted.

    A more efficient way would be to improve category_tree.php, but the override system does not cover classes [not that I am bold enough to try a stunt like that]

  2. #12
    Join Date
    Jan 2008
    Posts
    23
    Plugin Contributions
    0

    Default Re: adding description to category listing

    Hi,
    I made the change as mentioned above and it works, however I would like to position these div's to the right of the picture to conserve space.
    I tried to no avail. Any ideas?

    .category-description{
    float:right;
    clear:right;
    width:50%;
    text-align:left;
    }
    .category-name{
    float:right;
    clear:right;
    width:50%;
    text-align:left;
    }


    http://www.sitemagicdesigns.com/zen/...38d81363fe427b

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. description under sub-category listing
    By stefknits in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 Mar 2008, 07:43 PM
  2. description under sub-category listing
    By stefknits in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 28 Feb 2008, 09:26 PM
  3. duplicate description i category listing
    By Tango in forum Basic Configuration
    Replies: 0
    Last Post: 20 Apr 2007, 08:51 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