Sorry, I ended the IF incorrectly ...
Try this code in RED:
Code:
// bof: hide empty categories
if (zen_count_products_in_category($categories->fields['categories_id']) == 0) {
// skip empty category
echo 'Skipped empty category: ' . $categories->fields['categories_name'] . '<br>';
} else {
$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'] . ' ' . $countContentProduct . '</a>');
$col ++;
if ($col > (MAX_DISPLAY_CATEGORIES_PER_ROW -1)) {
$col = 0;
$row ++;
}
}
// eof: hide empty categories
$categories->MoveNext();
}
}
Bookmarks