output upon clicking one of the products within the first category with four products:
current-cat:0 processing-cat:1
This indicates that $current_category_id (a stock ZC variable) is null or 0 when you are on a product info page. There needs to be a different variable tested to get the category that holds the current product. The mod's original developer knew that $current_category_id didn't work (unless you are on a category page), but didn't figure out a substitute. In /includes/classes/category_list.php around line , find
PHP Code:
// this doesn't work :(
if($category_id == $current_category_id){
and replace with
PHP Code:
// this doesn't work :(
//test gjh42 20130207
$current_category_id_list = $current_category_id? $current_category_id: ($products_id? zen_get_products_category_id($products_id): 0);
if($category_id == $current_category_id_list){
This should allow $box_categories_array[$i]['current'] to be correctly set, and simplify handling in tpl_category_list.php. I'll look at that next. Meanwhile, you can add a debug line
echo ' current='.$box_categories_array[$i]['current'];
in your debug area to see how it works.
Bookmarks