25 Mar 2013, 8:21 AM
Totally Zenned
- Join Date:
- Feb 2009
- Location:
- UK
- Posts:
- 1,326
- Plugin Contributions:
- 0
Customising center column cat counts by product type
I've just started looking into this - it might take me a while, so I thought I would ask the question now:
I currently have all category counts turned off, and would like to have center column category counts for product type Document General only (used for recipes).
I can achieve center column counts for all categories/product types using, in category_row.php:
$id = $categories->fields['categories_id'];
$count = zen_count_products_in_category($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'] . ' (' . $count . ')</a>');
How to apply it to Document General only? I think it needs edits to this part of the code.
$id = $categories->fields['categories_id'];
$count = zen_count_products_in_category($id);
Simon