Okay, correction to the logic flow...
Maybe the subcats with subcats are being assigned the correct class tag, but as the code ignores these subcats for output, we can't know without some debug code added.
The first thing to do would be to add the missing logic to handle subcats with subcats. Something like (find this)```php
// skip if this is for the document box (==3)
} else {
/////////////////////////////1.1/////////////////////////
if($box_categories_array[$i]['has_sub_cat'] && $new_style == 'category-top' ){
if($ul_close=='NO'){
$content =$content.'</ul></li>';
$ul_close='YES';
}
$ul_close='NO';
$content .= '<li><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
$content .= $box_categories_array[$i]['name'];
$content =$content.'</a><ul>';
}//new addon for <li>
/////////////////1.2///////////////////////////////
add another section after this one:php
// skip if this is for the document box (==3)
} else {
/////////////////////////////1.1/////////////////////////
if($box_categories_array[$i]['has_sub_cat'] && $new_style == 'category-top' ){
if($ul_close=='NO'){
$content =$content.'</ul></li>';
$ul_close='YES';
}
$ul_close='NO';
$content .= '<li><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
$content .= $box_categories_array[$i]['name'];
$content =$content.'</a><ul>';
}//new addon for <li>
///////////1.1a/////////////////
elseif($new_style == 'category-subs' ){//subcat with subcats
//if($ul_close=='NO'){//not sure how this section should work yet, need to study it more
//$content =$content.'</ul></li>';
//$ul_close='YES';
//}
$ul_close='NO';
$content .= '<li><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
$content .= $box_categories_array[$i]['name'];
$content .= '</a><ul>';
}//new addon for <li>
/////////////////1.2///////////////////////////////
elseif($box_categories_array[$i]['has_sub_cat']==false&&$new_style == 'category-products'){// for child