Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Missing category description

Missing category description

Locked

Views: 873

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
17 May 2009, 12:05 AM
#1
stagebrace avatar

stagebrace

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?

17 May 2009, 4:27 AM
#2
kim avatar

kim

Obaa-san

Join Date:
Jun 2003
Posts:
26,601
Plugin Contributions:
0

Re: Missing category description

Do you have your site set to go directly to the product info page if there is only one product in a category?

17 May 2009, 5:38 AM
#3
stagebrace avatar

stagebrace

Totally Zenned

Join Date:
Jan 2005
Location:
Tennessee
Posts:
985
Plugin Contributions:
0

Re: Missing category description

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>
17 May 2009, 6:56 PM
#4
stagebrace avatar

stagebrace

Totally Zenned

Join Date:
Jan 2005
Location:
Tennessee
Posts:
985
Plugin Contributions:
0

Re: Missing category description

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?