Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author RealMag777

    (@realmag777)

    Hello. Loks like you are right!
    I just found logic error in dynamic recounting, and fix will be in the next release. Just now you can do it self in the plugin code:

    index.php
    public static function dynamic_count($curr_term, $type)
    from row 577 to row 603
    between default and break replace by next code please:

    //checkbox, mselect
                    $is_in_query = false;
                    $is_in_query_index = -1;
                    $in_query_terms = array();
                    if (!empty($taxonomies) AND is_array($taxonomies))
                    {
                        foreach ($taxonomies as $k => $tax_block)
                        {
                            if ($tax_block['taxonomy'] == $curr_term['taxonomy'])
                            {
                                if (in_array($curr_term['slug'], $tax_block['terms']))
                                {
                                    $is_in_query = true;
                                } else
                                {
                                    $is_in_query_index = $k;
                                    $in_query_terms = $tax_block['terms'];
                                }
                            }
                        }
                    }
                    //***
                    if (!$is_in_query)
                    {
                        $taxonomies[$is_in_query_index] = array(
                            'taxonomy' => $curr_term['taxonomy'],
                            'terms' => array_merge($in_query_terms, array($curr_term['slug'])),
                            'include_children' => 1,
                            'field' => 'slug',
                            'operator' => 'IN'
                        );
    
                    }

    Hi RealMag777, sorry but mu knowledge of this kind of stuff is very limited. What exactly do I have to do?.

    I have opened the plugin file index.php with brackets but where exactly should i paset the

    public static function dynamic_count($curr_term, $type)

    and the other block of code ??

    Thanks

    It still doesn’t work. What its doing now is, it is keeping the selected term count the same, but it is now adding the count of that selected term on other terms count.

    Plugin Author RealMag777

    (@realmag777)

    @bhanumunjal
    What its doing now is, it is keeping the selected term count the same – there is no ajax redrawing for the selected drop-downs or checkboxes – all recount going after submiting of the form

    That helped. Great plugin!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘All filters get the same product count’ is closed to new replies.