Problem with filter logic

Forums › Forums › Search & Filter Pro › Problem with filter logic

Viewing 7 posts – 11 through 17 (of 17 total)
  • Anonymous
    #32159

    Yes. A posts, B posts, and A+B posts.

    Just a quick precision. Showing A, B and A+B items when A & B are selected is already working.
    What is not is showing only A items (not A+B) when you only select A.

    Anonymous
    #32192

    Hi again
    Here is the beginning of a solution. Maybe not the best but it’s a starting point.

    When you use multiselect or checkboxes (I use Advanced Custom Fields but I suppose default custom fields behave the same), multiple meta_values are stored like this :
    a:3:{i:0;s:5:"name1";i:1;s:5:"name2";i:2;s:5:"name3";}
    The way I understand this, a counts the number of lines, i is the index, and s counts the number of letters in the value label.

    Let’s say S&F offers a new option besides AND and OR operators (though you can’t really call this an operator): “Posts with multiple values for the same key must have each of those values in the options selected.

    When submitting the form, test each selected option. Count 1 for a positive test. Add 1 for each valid option.
    Then compare the result to the number of lines for this meta_key.
    If result = number of lines, show this post,
    else don’t show this post.

    How does that sound? It works on paper. ^^

    Ross Moderator
    #32228

    Hey Julien

    Yup I follow the logic here its just a little more complex because S&F uses its own caching system too combined with WP_Query – so its a bit about implementation, and also how to provide this as an option to a user (which is clear and easy to understand).

    I’ll have to have a further look to see if its possible to add in – just busy working on the next update at the moment and this requires me to do some serious debugging around the code.

    Thanks

    Anonymous
    #32229

    Ok Ross, thanks for considering this.
    I hope we’ll talk about it later.
    On the time being, good luck with the update and debugging.

    Anonymous
    #35876

    Dear Ross
    I hope you’re all good.
    I dare a short message to try and see if there is any plan for the request I made. For now, I can’t use the plugin, but I hope you will find time and interest to create this. I’ll be more than glad to help you in any way I could.
    Thanks

    PS : btw, I can’t update to latest version (2.1.2). I keep getting “Download failed. Unauthorized” messages.

    Ross Moderator
    #36188

    Hey Julien

    Can you try disable & re-activate your license and the plugin update again?

    RE the updates, I’m afraid I didn’t quite get anywhere with them just yet – there are a few large features at the top of my priority list which are just taking a lot longer for me to get round to.

    Thanks

    Anonymous
    #36314

    Hi Ross
    Disabling and reactivating the licence didn’t work.

    An error occurred while updating Search & Filter Pro: Download failed. Unauthorized

    Regarding the feature request, I understand. If you don’t mind, I will contact you from time to time to know if you think you might have time to work on it. Maybe I could be of some help.
    Regards

Viewing 7 posts – 11 through 17 (of 17 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.