Hi,
The
contains the data of the products of the current listing so that, indeed the system can only display the values of the currently displayed listing. However, this is only the case if you turn on the "dynamic display" setting of your filter. Otherwise, as you saw, that variable is empty.
Regarding the fact that you want to see all the third level categories, you'll have to change these lines:
if(!empty($filter->filter_options['parent_category_id'])){
$parentCat=$filter->filter_options['parent_category_id'];
$categories = explode(',',trim($parentCat,','));
JArrayHelper::toInteger($categories);
$filters[]='a.category_parent_id IN ('.implode(',',$categories).')';
}else{
$filters[]='a.category_parent_id=0';
}
that's where the system adds the condition to the MySQL query below to only load the first level of categories or to only load the direct sub categories of the selected category.