• abledragon

    (@abledragon)


    Hi Guys,

    On the catalogue page if a visitor checks a category, and a sub-category under a different category, the filtering algorithm doesn’t work – no products are returned.

    It works perfectly if, instead of clicking the category you click all sub-category items under that category. If you then click sub-category items under a different category the correct number of machines is returned.

    On the page I’ve linked to lower down you can see what I mean, if you:

    1. Click the Raschel category (selects 20 items)

    2. Click the 2-bar sub-category under the Tricot category.

    No items are returned.

    However, if you click:

    1. Both sub-categories under the Raschel category, but not the category itself, 20 items are returned (correct response)

    2. Click the 2-bar sub-category under the Tricot category a total of 26 items are returned (the correct response).

    Could you see whether it’s possible to make that calculation work in the situation where someone clicks a category (not the sub cats) and a sub-category under a different category..?

    Here’s the link:

    https://abledragon.com/demosite-1/pre-owned-machinery/warp-knitting-machines/

    Many thanks!

    Martin.

Viewing 10 replies - 1 through 10 (of 10 total)
  • etoilewebdesign

    (@etoilewebdesign)

    Hi Martin,

    I can understand why someone might be confused when browsing as in your first example. However, the calculations/querying is being done correctly by the plugin. There’s no possibility to have one product in two different categories, so it should return no results in this case.

    If you do as in your first example, but then also select the top-level category of Tricot, then it will display the results. We can look into possibly making it so that you can have one top level clicked and then click only on a sub-category in a different category and treating this as an OR conditional.

    In the meantime, in your case, it’s more a question of setting it up with the right control type, etc. based on how you want people to be able to browse. For example, using the radio or dropdown control type, or setting sub-categories to not be hierarchical, etc.

    Thread Starter abledragon

    (@abledragon)

    Hi Guys,

    I’ve not been able to achieve what we need to achieve by selecting different controls in the options screens.

    How about if you make it so that clicking on a category automatically checks all its subcategories and clicking on a single sub-category automatically also checks its parent category..?

    That process delivers the correct result in my example. It also does not change the current behaviour because it produces the same result as just clicking a single subcategory or a parent category does currently.

    Would that be possible..?

    Cheers,

    Martin.

    etoilewebdesign

    (@etoilewebdesign)

    Hi Martin,

    Thank you for the suggestions. “clicking on a single sub-category automatically also checks its parent category” is the more likely of the two that we’d implement. We’ll look into this.

    Thread Starter abledragon

    (@abledragon)

    Hi there,

    That would be great, many thanks! And your preferred option (clicking on a single sub-category. . . ) would do the trick and produce the result we are looking for (26 machines, in the example I gave).

    Many thanks – very much appreciated!

    Cheers,

    Martin.

    mikeb62

    (@mikeb62)

    Hey!

    Just installed the plugin yesterday and was about to purchase the upgrade but then came across this ‘issue’ as well before stumbling on this thread πŸ™‚

    I had the same experience as abledragon described in the original post: If a user selects a Category but a previous sub-category has been selected, they’re shown nothing. Have tried mixing all the checkbox/radio/etc. settings across each level and can’t get a result that solves the issue.

    Atleast in our usecase (and from the sounds of it, abledragon’s) this seems counterintuitive and is the biggest blocker we have to using the Plugin right now. Love what you guys have built, and have found a *very* manual workaround to make it suit our needs but it’s definitely not ideal.

    +1 abledragon’s suggestions. I think the confusion stems from sub-categories being treated the same as categories themselves, rather than a sub-class of categories where you can’t have a sub-category selected without it’s parent category selected as well.

    I’ll be purchasing the upgrade over the next few days and continue using with our manual workaround, but would love to see an option added to change the way this is treated. Happy to provide more feedback/detail if it helps!

    Cheers,

    Mike

    Hi

    I have the same issue since 4.1.12 but it is still not fixed or not important enough. I am gald that some other users report similar problems so hopefully this gets fixed now πŸ™‚

    I use “radio-button” mode for my categories/sub-categories and i simply expect that it works just like any other product catalogue or webshop.

    https://ww.wp.xz.cn/support/topic/4-1-12-bug-sometimes-no-articles-found-shown-but-there-are-articles/

    Best,
    Thomas

    Hi @abledragon, @mikeb62 and @thomymaster ,

    We’ve released a new update on UPCP with changes to the sidebar categories/sub-categories code.

    Thread Starter abledragon

    (@abledragon)

    Hi Guys,

    I appreciate the work you’ve done but it doesn’t meet the requirement.

    This was that clicking on a sub-category automatically selects its parent category.

    If that requirement was met it would then be possible to select all the machines under one category (by clicking the category) and all machines under a different sub-category, and get the correct result. E.G. Clicking the Raschel category and the 2-bar sub-category under Tricot would return 26 machines.

    This happened correctly on prior versions but only if you also clicked the Tricot category – hence the request to automatically select the parent category when a sub-category was clicked.

    Now, clicking on a sub-cateogry (e.g. 2-bar under Tricot) and on a category (Raschel) does not deliver the 20 Raschel machines – only the 6 2-bar machines.

    Clicking on a Category (Raschel) greys out all subcategories except those under the selected category, but the requirement was to be able to select (for example) all Raschel machines and all Tricot 2-bar machines.

    Further, if I now select the Raschel Category (20 machines), the Tricot category and then the Tricot subcateogry, I get only 6 machines. Previously this selection produced the correct result (26 machines) but now it doesn’t.

    Sorry to be a pain, guys, but can it be set up so that clicking a sub-category automatically selects the parent category? That’s really all I’m asking for.

    That would enable a site visitor to select all the Raschel machines (by clicking the Raschel category) plus the 2-bar Tricot machines (by clicking that sub-category) and return the correct result of 26 machines.

    Cheers,

    Martin.

    Hi Martin,

    There are multiple cases in which someone may want to select sub-categories, but not the corresponding parent categories. For example, one would be if someone isn’t using the hierarchical sub-categories display.

    The functionality as it stands right now, in which it grays out the options that won’t give any match, and in which it clears existing selections that would prevent a match, is the functionality that makes the most sense to allow everyone to keep using it as they were and to now prevent easy accidental empty selections.

    Thread Starter abledragon

    (@abledragon)

    Hi Guys,

    I hear what you say re someone not using the hierarchical display. So maybe the logic has to be that if the hierarchical display is being used, then clicking a sub-category automatically selects its parent category. This then enables the example I have used throughout to return the expected result, without disturbing those who are not using the hierarchical display

    BTW – when this is done manually i.e. clicking a sub-category and then clicking its parent category, it returns the initial sub-cat selection – which is the expected result.

    In the previous version of the plugin that process worked perfectly, when done manually, and enabled the example I gave to return the expected result. So the suggestion merely automates a manual process.

    However, the current configuration produces unexpected results – as in this example:

    1. Select Raschel category – expected result 20, actual result 20
    2. Add the Tricot category – expected result 29, actual result 29
    3. Select the 2-bar category under Tricot – expected result 26, actual result 6 (the Raschel category, which is still checked, is now ignored, giving an unexpected result)

    Here’s the link again:

    https://abledragon.com/demosite-1/pre-owned-machinery/warp-knitting-machines/

    To eliminate this unexpected result you will need to grey out all other parent categories when any sub-category is selected.

    That would not meet what I need to achieve but it would, at least, eliminate unexpected results.

    Do please look again at my comment re conditional logic that I made in the first para of this reply. That seems to me to eliminate the unexpected results while at the same time giving site visitors the maximum flexibility (and would meet what I’m trying to achieve..!)

    Cheers,

    Martin.

    [ No bumping please. ]

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

The topic ‘Category and Sub-Category Selection Calculation’ is closed to new replies.