Totally Zenned
- Join Date:
- Jan 2005
- Location:
- Tennessee
- Posts:
- 985
- Plugin Contributions:
- 0
Missing category description
When there is only one product in a category, its category description is not shown. How can I force it to show?
Views: 873
Totally Zenned
When there is only one product in a category, its category description is not shown. How can I force it to show?
Obaa-san
Do you have your site set to go directly to the product info page if there is only one product in a category?
Totally Zenned
Kim, I will try and answer your question in the morning. In the mean time this is what I did to fix this issue.
<?php
/**
* Module Template
*
* @package templateSystem
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_modules_category_icon_display.php 6216 2007-04-17 06:09:57Z ajeh $
* modifyed to include the $current_categories_description 2009-05-17 (stagebrace)
*/
require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_CATEGORY_ICON_DISPLAY));
$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'];
}
?>
<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 . '</a>';echo $current_categories_description ?></div><br>
Totally Zenned
Do you have your site set to go directly to the product info page if there is only one product in a category?
Where in admin is this set?
Fields marked required must be completed.
Tell staff why this post should be reviewed.