Added if(!isset($leftjoin)) in front of lines 620 and 634 but it didn't seem to change anything.
I probably just did it wrong as I know nothing about php.
Here is lines 616-623
if($setFilters){
if(isset($widget->widget_params->filters['cat.category_id'])){
if(($widget->widget_params->content=='customers' || $widget->widget_params->content=='partners')){
$leftjoin['order'] = ' LEFT JOIN '.hikashop_table('order').' AS o ON o.order_id = a.user_id ';
if(!isset($leftjoin['order_product']))$leftjoin['order_product'] = ' LEFT JOIN '.hikashop_table('order_product').' AS prod ON prod.order_id = o.order_id ';
}else{
if(!isset($leftjoin['order_product']))$leftjoin['order_product'] = ' LEFT JOIN '.hikashop_table('order_product').' AS prod ON prod.order_id = a.order_id ';
}
And here are lines 631-639
if(isset($widget->widget_params->filters['prod.product_id'])){
if(($widget->widget_params->content=='customers' || $widget->widget_params->content=='partners')){
$leftjoin['order'] = ' LEFT JOIN '.hikashop_table('order').' AS o ON o.order_user_id = a.user_id ';
if(!isset($leftjoin['order_product']))$leftjoin['order_product'] = ' LEFT JOIN '.hikashop_table('order_product').' AS prod ON prod.order_id = o.order_id ';
}else{
if(!isset($leftjoin['order_product']))$leftjoin['order_product'] = ' LEFT JOIN '.hikashop_table('order_product').' AS prod ON prod.order_id = a.order_id ';
}
}
}