Hide field values when the current category does not have products with those

Forums › Forums › Search & Filter Pro › Hide field values when the current category does not have products with those

Viewing 2 posts – 1 through 2 (of 2 total)
  • Anonymous
    #253585

    Scenario:
    – On product category “X” there are only 8 products
    – We have a product category filtering field hidden by CSS to guarantee the filter only works on those products, as stated here: https://support.searchandfilter.com/forums/topic/filter-inside-current-category/ (and it’s working just fine)
    – We have several filtering (taxonomy and post_meta) filtering fields that currently show all values existing on all products

    Desired:
    – The fields should only show values that are related to the 8 products shown

    Example:
    – https://www.nzytech.com/products-services/category/cazymes/glycoside-hydrolases/arabinanases/
    – These 8 products only have these “Organisms”: Bacillus subtilis, Bacteroides thetaiotaomicron, Thermotoga petrophila, Ruminococcus champanellensis
    – If you chose to filter on one of these it works just fine, but if you chose another organism, it shows all 8 products (when it shouldn’t show any product at all)
    – We need to show ONLY those 4 organisms
    – This applies to all the other filtering fields

    Trevor
    #253608

    Did you …

    In the General Setting tab, set Auto Count (both settings) to ON

    And then in the Form UI:

    In each field set Hide Empty to ON

Viewing 2 posts – 1 through 2 (of 2 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.