Hi peanut77,
I already got it working as I want it (currently) to work, I only did not get to posting it here yet.
On 1.3.5, I changed modules/category_row.php to (saved the editted file to my over rides template dir of course):
<?php
/**
* index category_row.php
*
* Prepares the content for displaying a category's sub-category listing in grid format.
* Once the data is prepared, it calls the standard tpl_list_box_content template for display.
*
* @package page
* @copyright Copyright 2003-2006 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: category_row.php 4084 2006-08-06 23:59:36Z drbyte $
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
$title = '';
$num_categories = $categories->RecordCount();
$row = 0;
$col = 0;
$list_box_contents = '';
if ($num_categories > 0) {
if ($num_categories < MAX_DISPLAY_CATEGORIES_PER_ROW || MAX_DISPLAY_CATEGORIES_PER_ROW == 0) {
$col_width = floor(100/$num_categories);
} else {
$col_width = floor(100/MAX_DISPLAY_CATEGORIES_PER_ROW);
}
while (!$categories->EOF) {
if (!$categories->fields['categories_image']) !$categories->fields['categories_image'] = 'pixel_trans.gif';
$cPath_new = zen_get_path($categories->fields['categories_id']);
// strip out 0_ from top level cats
$cPath_new = str_replace('=0_', '=', $cPath_new);
// $categories->fields['products_name'] = zen_get_products_name($categories->fields['products_id']);
/*
$list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'] . '</a>');
*/
// bof add categories descriptions to category rows paulm
$categories->fields['categories_description'] = zen_get_category_description($categories->fields['categories_id'], $_SESSION['languages_id']);
$list_box_contents[$row][$col]['params'] = 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"';
$list_box_contents[$row][$col]['text'] = '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>';
//$list_box_contents[$row][$col]['text'] .= '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories->fields['categories_name'] . '</a>';
$list_box_contents[$row][$col]['text'] .= '<div class="rowCategoriesDescription">';
//$list_box_contents[$row][$col]['text'] .= '<h4><a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories->fields['categories_name'] . '</a></h4>';
$list_box_contents[$row][$col]['text'] .= '<h4>'. $categories->fields['categories_name'] . '</h4>';
$list_box_contents[$row][$col]['text'] .= '<div>' . $categories->fields['categories_description'] . '</div>';
$list_box_contents[$row][$col]['text'] .= '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . CATEGORY_ROW_GOTO_PRODUCTS_TEXT . '<span>' . $categories->fields['categories_name'] . '</span>' . '</a></h4>';
$list_box_contents[$row][$col]['text'] .= '</div>';
// eof add categories descriptions to category rows paulm
$col ++;
if ($col > (MAX_DISPLAY_CATEGORIES_PER_ROW -1)) {
$col = 0;
$row ++;
}
$categories->MoveNext();
}
}
?>
Of course improvements are possible, but this way it's one easy edit (not counting CSS styling edits).