Forums Forums Search & Filter Pro How to show only relevant filters for each category?

Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Anonymous
    #264431

    Hi Trevor,

    I am using different Woocommerce product categories, each with their own attribute set; with ACF I added different attributes to every category. Now when I view a category on the front end, I see all filters instead of only the filters that are assigned to this category.

    How can I achieve that only the assigned filters are shown in a category?
    Thanks in advance,
    Roeland van Oostenbrugge

    Trevor
    #264475

    Assuming that Product Category is a field in the form, and that the correct Category is already selected (there is an auto detect option/setting in the form settings), then, in the General Setting tab, set Auto Count (both settings) to ON

    And then in the Form UI:

    In each field set Hide Empty set to ON

    Anonymous
    #264676

    Hi, thanks for your explanation. I did what you say but it seems not to work;

    – I added a productcategory filter based on the taxonomy filter
    – The right category is indeed selected after loading the front end
    – Both auto count settings are on
    – Hide empty is on in every field where available (not available in range slider number field)

    1) All fields are still shown on front end, also when the corresponding ACF attribute is not connected to the product category
    2) Selecting a filter option on front end removes the products, I think because of the range slider field parameters that are added to the url.

    Any ideas?
    Thanks again,
    Roeland van Oostenbrugge

    Trevor
    #264773

    Ah, you want the fields themselves to disappear (field dependency). Do all the terms disappear, but not the fields themselves? Our Hide Empty feature only applies to the terms. Whilst this may change for V3, the only way to do that now would be some custom javascript. Just how that might work, I am not sure, but I have no snippets to share for that, sorry.

    Anonymous
    #265714

    Hi! Yes that is what I meant indeed. No problem to write some custom JS for that. However I have a small problem with recognizing if a number slider “contains” items. Do you have any idea how to check this in JS?

    Trevor
    #265795

    I do not, sorry.

    Anonymous
    #265806

    Ok! Do you have an estimate when you V3 will be ready?

    Trevor
    #265813

    We do not, sorry.

Viewing 8 posts - 1 through 8 (of 8 total)