Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2006
    Location
    Huntington Beach, CA
    Posts
    55
    Plugin Contributions
    0

    Default Category descriptions on Main Page

    Hi everyone,

    I am looking to add the category descriptions to teh right of the categories on the main page.

    You can see my site here: http://www.inkjetoutput.com/new_store/

    I already have the space for the description and I have twaeked with this file: /includes/modules/category_row.php but i can not get it to work. I have modified line 40 from:

    PHP Code:
                                               '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_WIDTHSUBCATEGORY_IMAGE_HEIGHT) . '<br />' $categories->fields['categories_name'] . '</a>'); 
    To:

    PHP Code:
                                              '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_WIDTHSUBCATEGORY_IMAGE_HEIGHT) . '</a><br />' $categories->fields['categories_name'] . '<br>' $categories->fields['categories_description'] . '<hr>'); 
    Notice the last line where I tried to call for

    PHP Code:
    $categories->fields['categories_description'
    It is not grabbing the description though. What can I do to have this grab the description?

    Thanks in advance!
    Rob
    Pier Marketing ◄ Printing and Marketing Collateral - Order Online!
    Pier Technologies ◄ Web Development & IT Solutions
    And That's News? ◄ My NEW Blog!!

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

    Default Re: Category descriptions on Main Page

    Since it is not used here, I expect that $categories->fields[] is not built to include 'categories-description', so there is nothing to grab.

    I think you will need to find where it is built and add and populate that field before you can retrieve it here.

  3. #3
    Join Date
    Jun 2006
    Location
    Huntington Beach, CA
    Posts
    55
    Plugin Contributions
    0

    Default Re: Category descriptions on Main Page

    $categories->fields[] is used here as $categories->fields['categories_name'] but not the fields. They are both in the same table but when I call for the descriptions it doesn't work. I need to find the function or class that is used but I can not figure it out.
    Rob
    Pier Marketing ◄ Printing and Marketing Collateral - Order Online!
    Pier Technologies ◄ Web Development & IT Solutions
    And That's News? ◄ My NEW Blog!!

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

    Default Re: Category descriptions on Main Page

    Clearer wording:
    Since 'categories-description' is not used here, I expect that $categories->fields[] is not built to include it...

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

    Default Re: Category descriptions on Main Page

    /includes/functions/functions_categories.php, lines 370-405:
    PHP Code:
    // categories pulldown with products
      
    function zen_draw_products_pull_down_categories($name$parameters ''$exclude '') {
        global 
    $db$currencies;

        if (
    $exclude == '') {
          
    $exclude = array();
        }

        
    $select_string '<select name="' $name '"';

        if (
    $parameters) {
          
    $select_string .= ' ' $parameters;
        }

        
    $select_string .= '>';

        
    $categories $db->Execute("select distinct c.categories_id, cd.categories_name " ."
                                    from " 
    TABLE_CATEGORIES " c, " .
                                             
    TABLE_CATEGORIES_DESCRIPTION " cd, " .
                                             
    TABLE_PRODUCTS_TO_CATEGORIES " ptoc " ."
                                    where ptoc.categories_id = c.categories_id
                                    and c.categories_id = cd.categories_id
                                    and cd.language_id = '" 
    . (int)$_SESSION['languages_id'] . "'
                                    order by categories_name"
    );

        while (!
    $categories->EOF) {
          if (!
    in_array($categories->fields['categories_id'], $exclude)) {
            
    $select_string .= '<option value="' $categories->fields['categories_id'] . '">' $categories->fields['categories_name'] . '</option>';
          }
          
    $categories->MoveNext();
        }

        
    $select_string .= '</select>';

        return 
    $select_string;
      } 
    This looks like the place, but I don't know enough to safely edit it.

  6. #6
    Join Date
    Jun 2006
    Location
    Huntington Beach, CA
    Posts
    55
    Plugin Contributions
    0

    Default Re: Category descriptions on Main Page

    That is not it. That is for a category pull down menu. I still can not find it either
    Rob
    Pier Marketing ◄ Printing and Marketing Collateral - Order Online!
    Pier Technologies ◄ Web Development & IT Solutions
    And That's News? ◄ My NEW Blog!!

  7. #7
    Join Date
    Jun 2006
    Location
    Huntington Beach, CA
    Posts
    55
    Plugin Contributions
    0

    Default Re: Category descriptions on Main Page

    Quote Originally Posted by webrob View Post
    That is not it. That is for a category pull down menu. I still can not find it either
    Does anyone know if this comes form a function or a class file at least??
    Rob
    Pier Marketing ◄ Printing and Marketing Collateral - Order Online!
    Pier Technologies ◄ Web Development & IT Solutions
    And That's News? ◄ My NEW Blog!!

  8. #8
    Join Date
    Jun 2006
    Location
    Huntington Beach, CA
    Posts
    55
    Plugin Contributions
    0

    Default Re: Category descriptions on Main Page

    No one has done something like this? I really need to figure this out!!! Please help someone!!

    Rob
    Pier Marketing ◄ Printing and Marketing Collateral - Order Online!
    Pier Technologies ◄ Web Development & IT Solutions
    And That's News? ◄ My NEW Blog!!

  9. #9
    Join Date
    May 2007
    Location
    Leicester, England
    Posts
    165
    Plugin Contributions
    1

    Have a Drink Re: Category descriptions on Main Page

    Yep

    I'd like to know how to do that, too!! If you find out, let me know!!

  10. #10
    Join Date
    Jul 2005
    Location
    Newfoundland, Canada
    Posts
    63
    Plugin Contributions
    0

    Default Re: Category descriptions on Main Page

    I'm looking to do the same thing..... add the Category description to the category list page. I'm using Zen-Cart 1.3.8a and have edited the category_row.php page to show the category picture, then the cat name and I want the description placed below the name for each category. I've can't seem to determine which function i must edit so that the $categories->fields['categories_description'] would work. I'm assuming it's one of the functions within functions_categories.php. Can someone please offer some assistance???

    Thanks

 

 

Similar Threads

  1. Descriptions on Main Page
    By Renz in forum General Questions
    Replies: 5
    Last Post: 8 Nov 2012, 06:39 AM
  2. Category descriptions on the main page?
    By mpayson in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 15 Mar 2011, 12:17 AM
  3. Category Descriptions on Main Page
    By tomkeyes in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Oct 2009, 07:45 PM
  4. Can't change main page descriptions
    By Mickmo68 in forum General Questions
    Replies: 10
    Last Post: 16 Feb 2009, 01:49 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