Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Apr 2013
    Location
    Florida
    Posts
    6
    Plugin Contributions
    0

    Idea or Suggestion Display Category Description below category Title on the Product page

    For some reason this code is not working in 1.5.1

    <?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 ?>

    Any ideas ?

  2. #2
    Join Date
    Apr 2013
    Location
    Florida
    Posts
    6
    Plugin Contributions
    0

    Default Re: Display Category Description below category Title on the Product page

    More info:

    If you go to this site, you will have a better view what I am trying to say. The description is appearing between the two tittles.
    you have to highlight it to be able to see it, it is in black. I want it next to the category image.

    http://kingsunlimited.com/index.php?...roducts_id=132

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Display Category Description below category Title on the Product page

    You appear to have the color set to black in your stylesheet:
    #indexProductListCatDescription, #categoryDescription {
    color: #000000;
    display: block;
    font-family: Arial,Helvetica,sans-serif;
    font-size: 12px;
    line-height: 18px;
    overflow: hidden;
    }
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

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

    Default Re: Display Category Description below category Title on the Product page

    You will have to adjust the placement of this code in your Template Monster template file (/includes/templates/your_template/templates/tpl_product_info_display.php). The actual div that holds the image link is an insane seventeen levels deep inside the wrapper that makes the white box. You need to move the code so it is somewhere inside that nest, possibly just after the link code closes; it is hard to say where exactly without testing, as the file has so many containers sitting inside each other.

  5. #5
    Join Date
    Apr 2013
    Location
    Florida
    Posts
    6
    Plugin Contributions
    0

    Default Re: Display Category Description below category Title on the Product page

    Thanks for the reply.

    I placed the code after the Category Icon (/includes/templates/your_template/templates/tpl_product_info_display.php):

    <!--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 } ?>
    <!--eof Category Icon -->

    <!--Bof Category Description -->
    <?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 Description -->

    Any Idea where the nest begins or Portion of the code that I need to look at ?

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

    Default Re: Display Category Description below category Title on the Product page

    The nest is apparently built entirely in tpl_modules_category_icon_display.php, so you will have to put your code in that file to get it inside the nest.

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

    Default Re: Display Category Description below category Title on the Product page

    The entire functional code of the stock version of that file is
    PHP Code:
    /*...
     * @version $Id: tpl_modules_category_icon_display.php 6216 2007-04-17 06:09:57Z ajeh $
     */
      require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_CATEGORY_ICON_DISPLAY));

    ?>

    <div align="<?php echo $align?>" id="categoryIcon" class="categoryIcon"><?php echo '<a href="' zen_href_link(FILENAME_DEFAULT'cPath=' $_GET['cPath'], 'NONSSL') . '">' $category_icon_display_image $category_icon_display_name .  '</a>'?></div>
    Obviously the TM version will be much bigger.

  8. #8
    Join Date
    Apr 2013
    Location
    Florida
    Posts
    6
    Plugin Contributions
    0

    Default Re: Display Category Description below category Title on the Product page

    I am close. I just placed the code in tpl_modules_category_icon_display.php
    I can see the description now, but it's not aligment properly.

    http://kingsunlimited.com/index.php?...roducts_id=132

    <div align="<?php echo $align; ?>" id="categoryIcon" class="categoryIcon">

    <!--Bof Category Description -->
    <?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 Description -->

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

    Default Re: Display Category Description below category Title on the Product page

    Try putting your code just after the categoryIcon div's closing </div>. You may need to float the description right (in your stylesheet) to get it on the same line as the image. Once they are displaying in the correct sequence, I can look at it and give you the style rules to use.

  10. #10
    Join Date
    Apr 2013
    Location
    Florida
    Posts
    6
    Plugin Contributions
    0

    Default Re: Display Category Description below category Title on the Product page

    Now the description is appearing underneath of the image.
    We just need to aligment to the right and the middle.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 13
    Last Post: 2 Nov 2010, 06:25 PM
  2. Moving Category Description below category images
    By Funkhouserjm in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 26 Apr 2010, 02:35 AM
  3. I want to hide the (category) title just below my nav tabs.
    By jessicasin in forum Templates, Stylesheets, Page Layout
    Replies: 15
    Last Post: 21 Dec 2009, 03:06 AM
  4. Display Category Description below category Title on the Product page
    By nigelt74 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 4 Sep 2009, 02:06 PM
  5. Can the Category Description be moved below the product pics?
    By kidzcomfort in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 3 Aug 2008, 02:15 AM

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