Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • @themifyme
    Hmm… The example you linked shows three phones, but manipulating the parameters does nothing. Unchecking the Phone category or checking anything new doesn’t give new results, so I can’t evaluate.

    That stands true for the entire website you linked. I tested on both Edge and Chrome – got the same result.

    Would you mind adding support for parent-categories as well?
    Like I said, my problem was that I couldn’t pick a parent-category and query more child-categories because of how the logic is implemented.

    If you pick the parent category Weights which includes Barbells and Dumbbells, all items in both of these categories will be shown. If you pick another, let’s say Dumbbells, the Barbells will still show since they’re included in the parent Weights category.

    Take a look on ebay for example:

    In this example I’ve navigated to the parent-category named Apple. It’s crucial that we can navigate further down. Let’s say I went along and picked iPhone 11 as my next choice – now I don’t expect to show iPhone 10, or earbuds or anything just because it’s included in the parent category.

    Have you got a function for this and I just missed it?

    I modified your plugin a bit to add support for this.
    It’s quite fagile atm but will work just fine, as long as you take its limitations in consideration while developing.

    In the wpf-public.js, at after the “if (!$form.hasClass(‘wpf_form_ajax’))”-statement (outside of the if-scope), I simply added:

                if(result["wpf_cat"] == undefined && window.location.pathname.includes("/product-category/"))
                    result["wpf_cat"] = window.location.pathname.replace("/product-category/", "").replace("/", "");

    What the code does is it will add the slug-name of the URL as a category if no other category is selected, hence you just have to make sure that the url-slug matches the name of your parent-category.

    @crazymuffins this might solve your problem.

    I also faced the same problem as you did, with the entire product library showing when deselecting an item, but I managed to get it working.

    Please take a look at this website, posted by @themifyme:

    You can see that the category “bags” is locked and cannot be unchecked. When you change the url slug to the name of another category, that category is now locked. I simply made it so that my parent categories get locked in, and then I can select child-categories all I want.

    Just make sure that under Product Filters > Edit Product Filter > Category you select “AND” under logic. Meaning that BOTH of the arguments has to be true.

    There seems to be a bug preventing parent categories and child categories to be combined, so make sure to remove the parent-status from your categories and you should be good to go.

    I just realized that if you want to select multiple categories you wont be able to.

Viewing 3 replies - 1 through 3 (of 3 total)