• Konstatninos

    (@skredlemon)


    Hi,

    First off thanks for a great plugin! I have been testing almost all free filters plugins which I stumble upon, and yours is among those few that really stand out.

    I have really liked it, and am even considering upgrading to the premium version. However I would like to get this one question down first.

    I have set up 4 filters based on product attributes, plus an extra one based on price. I would like to ask if it is possible to combine the OR logic of each individual filter, with AND logic between attribute filters with AJAX.

    The end result in user experience that I am after is this: Say I want to be able to pick a couple of Brand attributes with filter A. I would like to have the filters B, C, and D automatically updated reflecting the available quantity of each, based on my selection in A. Currently I am totally able to pick any terms I like from each attribute filter, but it appears like it has no effect whatsoever with the remaining attributes filters. For instance, if I select a brand term with a total of 12 products, then I would expect that the sizes just below that would have at most 12 products each. However the XS size attribute continues to show 36 products, indicating that the brand term I picked did not affect the sizes (or the rest of the attributes filters).

    I have experimented with both the OR login and the AND logic, and to be honest I can’t really see any difference in their behavior.

    What is it that I have missed?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support angelagrey

    (@angelagrey)

    Hi,

    Thank you for reaching out to us. I’m sorry I missed your ticket for so long. My deepest apology for this mistake.

    The goal you want to achieve (automatically updated reflecting the available quantity of each) is actually how our plugin works. It updates the quantity of available products in each filter after filtering.

    I’ve checked this on my site, this function is still working, may you check again on your end?

    Regarding the “And” and “Or” logic, it’s for the filter itself. If you have a filter with 2 terms (or more) and you using both terms to filter

    >> With “And”: it shows products that must have both terms in it

    >> With “Or”: It shows products that contain either term 1 or term 2

    But the relation among filter blocks in a filter menu is always “And”. Which means if you have multiple filters (categories, attributes, star rating, price….). And for example, you filter items with category and attribute >> it’ll show the products that contain both selected attribute and category.

    I hope my explanation helps. If there’s anything unclear, please let me know.

    Best regards.

    Thread Starter Konstatninos

    (@skredlemon)

    Hi,

    Thank you for writing back even after so long. Thank you for elaborating also, although by now I had reached to that conclusion through trial and error. It doesn’t hurt to have your verification on this nonetheless.

    Best regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How do I combine AND and OR logic with AJAX?’ is closed to new replies.