AND/OR query filter doesn’t work, the behaviour is always AND

This topic has 4 replies, 2 voices, and was last updated 1 years, 10 months ago ago by Tony Rodriguez

  • Avatar: andrewhawk
    andrewhawk
    Participant
    December 29, 2022 at 18:20

    Dear support,
    even switching my xstore filter queries from AND to OR, taking ‘color’ as for example:

    – if I select red, I see all the red shoes
    – then, if I select blue, I see all the red AND the blue shoes

    as above, this happens even if I chose the OR query type.

    My expectations are (tell me if I am wrong):

    – if I select red, I see all the red shoes
    – then, if I select blue, I see all the blue shoes (unselecting the red ones)

    Thanks for the support

    3 Answers
    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    December 30, 2022 at 06:58

    Hello, @andrewhawk,

    If you choose the “OR” condition then you will be allowed to search multiple colors from the filters see the image: https://postimg.cc/SXCBdwvZ and https://postimg.cc/pmn4VwR2 but with the “AND” condition you can only search 1 color at a time. In simple words “AND” condition only works for 1 thing and the “OR” condition works for multiple things. This is how it works and you cannot change it without customization.

    Regards 8Themes Team.

    Avatar: andrewhawk
    andrewhawk
    Participant
    December 30, 2022 at 10:50

    Dear Tony,
    I checked the AND condition but I can still select two colors at time.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    December 30, 2022 at 14:23

    Hello, @andrewhawk,

    That is what I tried to explain to you above. Please read my previous message again carefully.

    AND Query: means must be true first and second condition
    OR Query: means anyone can be true from the first and second condition

    So that is the reason, with OR Query, you will be allowed to search multiple colors from the filters, let’s support you have a product having red and yellow color attributes/variations, so if you set the OR query, it will check whether the color can be anyone, it will show you the result.

    But with AND Query, it will only choose the single color, as it is must condition, it will not look for the other colors.

    This is how it works and the default functionality.

    Regards 8Themes Team.

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.