Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2007
    Posts
    1
    Plugin Contributions
    0

    Default Show Category description on Product info pages

    I need to display the category description text (but not the category image) at the top of the Product Information pages.
    I can do this for the Product Listing pages but cannot see how to do it for the Product Detail pages.
    Hope someone has the answer to this.
    Cheers
    J

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Show Category description on Product info pages

    You would have to add a database query into the main_template_vars.php pages module for product_info to extract the category description for the page's current language. And then add some further custom code into the tpl_product_info_display.php template to display the result of that database query.

    If you are using additional product types that have their own product_info-equivalent pages, you would need to repeat the above changes for each of them.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Feb 2008
    Posts
    12
    Plugin Contributions
    0

    Default Re: Show Category description on Product info pages

    I am having this same problem. Could someone give a little more detail into what needs to be done here?

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Show Category description on Product info pages

    Upon reflection, there's an easier way to do this. Just insert the following where you want this description to appear
    PHP Code:
    <p><?php echo zen_get_category_description(zen_get_products_category_id((int)$_GET['products_id']), (int)$_SESSION['languages_id']) ?></p>
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #5
    Join Date
    Feb 2008
    Posts
    12
    Plugin Contributions
    0

    Default Re: Show Category description on Product info pages

    That worked! Thanks for the help.

  6. #6
    Join Date
    Jul 2004
    Location
    Oxford
    Posts
    108
    Plugin Contributions
    0

    Default Re: Show Category description on Product info pages

    Thanks for this post. Works a treat!
    Ruth

  7. #7
    Join Date
    May 2009
    Posts
    22
    Plugin Contributions
    0

    Default Re: Show Category description on Product info pages

    http://www.ksbrands.co.uk/zen/index....roducts_id=486

    I'm tryin to get the Category description in the white space underneath the header but can't figure out why it's not working. Any help would be appreciated. Thanks

    Here's the code that I am using:

    Code:
    <!--bof Category Icon -->
    <?php if ($module_show_categories != 0) {?>
    <?php
    /**
     * display the category icons
     */
    require($template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_icon_display.php'); ?>
    <?php } ?>
    
    
    
    
    <?php
    $current_categories_description = "";
    // categories_description
    $sql = "SELECT categories_description
            FROM " . TABLE_CATEGORIES_DESCRIPTION . "
            WHERE categories_id= :categoriesID
            AND language_id = :languagesID";
    
    $sql = $db->bindVars($sql, ':categoriesID', $current_category_id, 'integer');
    $sql = $db->bindVars($sql, ':languagesID', $_SESSION['languages_id'], 'integer');
    $categories_description_lookup = $db->Execute($sql);
    if ($categories_description_lookup->RecordCount() > 0) {
      $current_categories_description = $categories_description_lookup->fields['categories_description'];
    }
    ?>
    
    <?php
    // categories_description
        if ($current_categories_description != '') {
    ?>
    <div id="indexProductListCatDescription" class="content"><?php echo $current_categories_description;  ?></div>
    <?php } // categories_description ?>
    
    
    
    <!--eof Category Icon -->

 

 

Similar Threads

  1. v151 show entire reviews on product info pages
    By noyloza in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 4 Mar 2013, 11:46 PM
  2. Bulk Upload Category Description & Meta Tag Info for Category and Product Level
    By kikboxr777 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 25 Jan 2011, 04:29 AM
  3. Add 'More Info' link to product description on Category page
    By gotlogos in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 Dec 2010, 03:33 AM
  4. Product listing show/hide more info by category
    By bobede in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 15 Jan 2009, 10:40 AM
  5. Product Info and Category Description
    By doodlebug in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 3 Apr 2007, 12:35 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