Forums Forums Search & Filter Pro Filter Counter

Tagged: 

Viewing 10 posts - 1 through 10 (of 13 total)
  • Anonymous
    #258794

    Hi,
    On my page I have a City Menu (no searchfilter) and Search&filter Plugin.

    If I select a city from the (CITY MENU) the plugin count (search & filter) is updated automatically

    if instead I click on an element of the filter (search & filter) the count (CITY MENU) is not updated.

    Is there any way any way to make my Menu count (dynamic) and make it work with search & filter?

    I hope I have explained myself correctly

    Thanks

    Trevor
    #258841

    Are you able to send me a live link/URL to your search page so I can take a look?

    Anonymous
    #258858
    This reply has been marked as private.
    Anonymous
    #258860
    This reply has been marked as private.
    Trevor
    #258909

    Ah. I see the issue. You need to add City to the form (you can hide it with the CSS display property in custom CSS for your theme), and make sure AutoDetect Taxonomies is ON (I assume city is a taxonomy?).

    Anonymous
    #258914
    This reply has been marked as private.
    Trevor
    #258918
    Anonymous
    #258922
    This reply has been marked as private.
    Anonymous
    #258926
    This reply has been marked as private.
    Trevor
    #258930

    You could make it so using custom javascript. If, in that hidden field, you enabled the count setting, in the form ‘city’ would have the counts. Your javascript would then update the counts in the city section from there. Not something we can help you with, except for the trigger part of the code.

    If you have Auto Count enabled, after the fields in the form update, your script would look like this:

    <script>(function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxformfinish", ".searchandfilter", function(){
        // run your code here
      });
    }(jQuery));</script>

    After the results update using Ajax, your script would look like this:

    <script>(function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        // run your code here
      });
    }(jQuery));</script>

    In V3 (due in a few months), you would be able to place the city field from the form in that header, and so avoid all of this.

Viewing 10 posts - 1 through 10 (of 13 total)