• Resolved InventiveWebDesign

    (@inventivewebdesign)


    I am trying to set up a filter on a product catalog for the client. I am mixing ACF and WooCommerce and saw that your plugin works great with both.

    The clients what to filter on Manufacturers as well as Model Numbers to narrow down the product selection. They have a lot of model numbers and I want to reduce them. I thought one way was to do this would be to have only model numbers for the manufacturer show up in that filter.

    Something like this:

    Field 1: Manufacturer (A, B, C)

    Field 2: Model Numbers for Manufacturer A

    Field 3: Model Numbers for Manufacturer B

    Field 4: Model Numbers for Manufacturer C

    I tried to do this by using your Parent Filter and saying to show the model numbers if the parent filter (Field 1) has been selected.

    The problem I found is that Fields 2-4 will all show up no matter what I select for field 1. Is there a way to say if Field 1 is A then show field 2, B then show field 3, C then show field 4?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author stepasyuk

    (@stepasyuk)

    Hello @inventivewebdesign

    Thank you for your interest in Filter Everything plugin.

    You can achieve your goal via custom coding:

    • You can use functionflrt_selected_filter_terms(); that allows you to detect what exactly filter terms were selected (or no one was selected). Please, see more about the function here – https://filtereverything.pro/resources/functions/
    • You can create empty.php file that displays nothing and to use the hook 'wpc_view_include_filename' to determine what exactly file should be included for particular filter in dependency from the filter terms are currently selected.

    Of course it requires to be familiar a bit with PHP and WordPress or you have ask a developer to help you with this.

    Regards.

    Hello @stepasyuk ! Is it possible to add the conditional feature that InventiveWebDesign described to the plugin core? Було б ц?каво отримати цей функц?онал з коробки, в?д самого розробника плаг?ну.

    • This reply was modified 1 year, 6 months ago by cyberpixel.
    Plugin Author stepasyuk

    (@stepasyuk)

    Hello @inventivewebdesign and @cyberpixel

    Sorry that bothering you with this issue again, but maybe I didn’t udnerstand you first time.

    In general if you use Parent filter option it should work as you described. When you select a Parent filter term, in the child filter you have to see only terms that have non-empty intersections (the same products or posts) that are in the selected Parent filter term. Please, see how it works here (temporary link) https://empty.filtereverything.pro/shop/

    If it does not work in the same way on your site, please let me know and provide me with details, why do you think that it works another.

    Thank you. Regards.

    @stepasyuk For example, there is a parent filter #1 with Audi and Volkswagen radiobuttons. Also I want to set hidden child filters: #2 with (A4, A6, A8, RS6, etc. models) checkboxes and #3 with (Amarok, Arteon, Golf, Passat, etc. models) checkboxes.

    So desired behavior is — when I choose an Audi radiobutton, only the filter #2 with (A4, A6, A8, RS6 models) checkboxes appears. When I choose a Volkswagen radiobutton, only the filter #3 appears and the filter #2 is hiding again.

    I found an exact example https://dasparts.ca/parts/partslist?filterUrlParams=categories%3D

    @stepasyuk @fesupportteam Hello! Just in case you missed my last reply… Is it possible to add what I described?

    Plugin Support fesupportteam

    (@fesupportteam)

    Hi @cyberpixel

    No, there is no such possibility and there is no need for it, you can make it work both in the same field, for example using logic and hiding empty terms.

    So it will work like this, we have categories Audi, BMW and etc, using “AND” logic, you choose for example Audi in the appeared filter you choose only terms that related only to the Audi category.

    Best Regards – Victor

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Make Filters appear conditionally based on selection of parent filter’ is closed to new replies.