Support » Plugin: Themify - WooCommerce Product Filter » Removing filters displays all product categories

  • Hi!

    For testing I have created 3 products each in their own category.
    When you go to one of those product category pages it displays the correct product on that page and also the product filtering works correctly… however when I UNcheck all the previously checked filters the page will then display all the products I have ever created despite their category. I am using Divi builder and have set the module to display only one specific product category. It works fine at first as you can only see 1 product on that page but the trouble start after unchecking the filters. (Like I said in the beginning: 3 products each in their own category and the test page is set to display only 1 category).

    To experience this please go to the site: http://novyeesti.ee/lakke/ and choose “90 cm” and “110 cm” from the left and then uncheck them… wham! 2 more products
    pop up. How to resolve this?

    Also, when using the product filters they pull products from all product categories. How can I turn this off? The problem with that is that let’s say I am on a ‘HATS’ product category page and choose the colour filter ‘red’, it will pull in results from another product category like ‘PANTS’ and display all red pants as well (although pants were not displayed on the ‘HATS’ page at first). Is there a way to avoid this? I am sure it will also solve the first problem I described.

    Otherwise great plugin! Thank you for your help!

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

Viewing 15 replies - 16 through 30 (of 36 total)
  • @themifyme – Thanks for the reply! Can you explain how I would be able to clear filters once on a category page and continue to show JUST that category? (If this topic needs to be moved to a new thread, let me know)

    Plugin Author themifyme

    (@themifyme)

    @maepedersen Once you clear categories, it will show all products from all categories. Unfortunately, it won’t return to the single category.

    Hooking in here as I am also seeing this issue two months after it has first been reported to @themifyme

    Do you happen to be able to provide a hotfix that I can use in my current project to fix this behaviour of themify product filter when used on category pages while using Divi Woo Shop module set to “current page” (so it is making use of the current page’s query loop instead of “all products”).

    Let me phrase the issue here once more:

    1. themify Filters pulls its results from “all products”-query instead only from “current taxonomy products”-query. Thus it will cause to display products in a product_cat page or product_tag page that should never show up there and also don’t need to be queried in the first place. Would make things a lot more performant also, if this was fixed, because query dataset becomes much smaller on each taxonomy page.

    This is currently a show stopper and I would like to make use of your plugin for filter functionality.

    Thanks!

    • This reply was modified 1 year, 2 months ago by Saskia Lund.
    • This reply was modified 1 year, 2 months ago by Saskia Lund.
    • This reply was modified 1 year, 2 months ago by Saskia Lund.
    Plugin Author themifyme

    (@themifyme)

    @jyria Could you provide the URL and screenshots to show the problem? Not too sure what you mean.

    Hi,
    I had the same problem. With Divi I had created like you a category page with Builder Divi and not the Shop module on a page. The problem was (as in your example) that it automatically ticks the category filter on the page. Except that if the user unchecks this filter it falls on all the categories of the site. After doing new tests, (without really knowing how) your filter worked with a page and the Shop module where I decided to display only certain categories on a page. Example Women’s Clothing on the Women’s page. Your filter worked very well, checked this displayed only women’s clothing with the filter and unchecked it returned to all women’s products only.
    But this morning, May 12, 2020, I wanted to update your plugin since there was a new update. And there it no longer works. The categories, colors filters work when checked. By cons if I uncheck all the products of the site is displayed, regardless of the category of the page. And the price filters show me other products from other categories that I don’t want on the page.
    My client’s site should be online tonight, so I decided to revert to your previous version of the plugin that works.
    If you are updating to fix the problem I will be very interested !
    I have the impression that there are many of us using the Divi theme and your powerful plugin.

    Plugin Author themifyme

    (@themifyme)

    @oneiros28 Could you setup a staging/test site where we can see the issue? In the last update, we’ve addressed a lot of issues related to Divi Shop module. But we haven’t test Divi Builder yet with Themify Product Filter.

    @themifyme If it helps, i’ve got the same issue. When a category is cleared it reverts to ALL products regardless of the selected product within DiviShop.

    inittest.net/inbuilt-wood-heaters

    was build with the divi builder, and should (While testing) only have two items displayed. The entire test data appears when the filters are deselected.

    Is there a way i can hard limit a store module to display a Parent category to avoid this issue? (As the current category within the Divi Shop module must be removed when a filter is applied?)

    • This reply was modified 1 year, 1 month ago by crazymuffins.
    joakimhalvardsson

    (@joakimhalvardsson)

    @crazymuffins
    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:
    https://themify.me/demo/themes/divi-filter/product-category/bags/

    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.

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

    Plugin Author themifyme

    (@themifyme)

    When you view a category (https://themify.me/demo/themes/divi-filter/product-category/bags/), the category filter is checked and disabled intentionally: https://share.getcloudapp.com/WnuG5p47. Will check with our developer to keep it enabled, so users can de-select it.

    joakimhalvardsson

    (@joakimhalvardsson)

    @themifyme
    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:
    https://www.ebay.com/b/Apple/bn_21819543

    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.

    Plugin Author themifyme

    (@themifyme)

    @joakimhalvardsson

    Don’t quite understand. We’ve added a child category “Phone” under “Tech” category on this demo: https://themify.me/demo/themes/divi-filter/?id=sidebar&wpf=1&wpf_cols=4&wpf_category=phone&price-from=0&price-to=1600.

    You still can select either or both categories “Tech” and “Phone”. What exactly is the issue?

    joakimhalvardsson

    (@joakimhalvardsson)

    @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.

    Plugin Author themifyme

    (@themifyme)

    Can you clear your browser cache? It is working at our end: https://share.getcloudapp.com/nOu8yPYA

    Thread Starter massiiv

    (@massiiv)

    Hi again! The issue is back.

    Check this page for example: http://novyeesti.ee/tooted/lakke
    Select a filter on the left and then unselect it – all products from all the categories are displayed.

    Maybe it has something to do with updates?
    Divi version: 4.4.7
    Product Filter version: 1.2.7
    WordPress version: 5.3.3

    Thank you!

    From what I understand, the person from themify who is replying here, is a support agent and not the plugin author him/herself. So we are nOt talking to a developer, who would actually understand the point.

    Please @themifyme , don‘t get me wrong, but I provided all needed information in my last post to fix the issue.
    Please pass it to the developer as it’s tech talk and I don‘t have time to explain how wordpress queries work and what those are to a support agent who is obviously a user him/herself and a non tech person.. the developer will know – he has to run his ajax call on the product query on category pages from get_queried_object_id(), so after filter reset on a category page, we will only see current category‘s products instead of ALL product available in the shop.

    Thanks, mate!

Viewing 15 replies - 16 through 30 (of 36 total)
  • The topic ‘Removing filters displays all product categories’ is closed to new replies.