ZenCart 1.3.7
Hi All
What I want to do is to display the Category Description on the Products page (I already have it on the categories page), but I cannot seem to get it to work
I have located where I want it to display, below this section of code
/includes/templates/my_templat/templates/tpl_product_info_display.php
I have found the code that displays the Categories description on the categories pageCode:<!--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 -->
/includes/templates/my_templat/templates/tpl_index_categories.php
However adding this code to the products page does nothing,Code:<?php // categories_description if ($current_categories_description != '') { ?> <div id="categoryDescription" class="catDescContent"><?php echo $current_categories_description; ?></div> <?php } // categories_description ?>
obviously i am missing the code that gets the Value of $current_Categories_description, It seems to be on theCode:<!--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 --> <!--added nigel --> <?php // categories_description if ($current_categories_description != '') { ?> <div id="indexProductListCatDescription" class="content"><?php echo $current_categories_description; ?></div> <?php } // categories_description ?> <!--end nigel -->
/includes/modules/pages/index/main_template_vars.php
page however i can't see where this is being called on the categories page (so i can copy the call to the products page)Code:$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']; }
What is frustrating is that I can access the $current_category_id and I realise i could use this to get the description by cutting and pasting the above function to the products page, however I am sure that there should be an inbuilt function call thingie
Any help would be greatly appreciated



