Forums / Setting Up Categories, Products, Attributes / Customising center column cat counts by product type

Customising center column cat counts by product type

Views: 536

Results 1 to 1 of 1
25 Mar 2013, 8:21 AM
#1
simon1066 avatar

simon1066

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