WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
categories widget after 2.1.3 update (30 posts)

  1. eximido
    Member
    Posted 5 months ago #

    Something is terribly wrong in new "fixed" version of categories listings introduced in woocommerce 2.1.3.

    Imagine category structure like this:

    - bikes
    - cars
    --- sportcars
    ------ ferrary
    ------ audi
    ------ mercedes
    --- hypercars
    ------ bugatti
    ------ mclaren
    - trucks
    --- very long vehicles
    --- not that long vehicles
    - bulldozers

    I've used to use option "Show children of current category only", which probably worked not as intended by the devs but showed the best viewing practices when there're a LOT of categories (much more than in example tree above). A complete set of examples:

    1. If you are in the main shop page, it shows only level-1 root categories:

    - bikes
    - cars
    - trucks
    - bulldozers

    2. If you go to level-1 category "trucks", it shows all its children AND all other level-1 categories:

    - bikes
    - cars
    - trucks
    --- very long vehicles
    --- not that long vehicles
    - bulldozers

    3. If you go to level-2 category "hypercars", it shows all its children, siblings, its parent category as well as all level-1 root categories:

    - bikes
    - cars
    --- sportcars
    --- hypercars
    ------ bugatti
    ------ mclaren
    - trucks
    - bulldozers

    4. Finally, if you go to level-3 category "ferrary", it shows all its siblings, parents hierarchy and all other level-1 categories:

    - bikes
    - cars
    --- sportcars
    ------ ferrary
    ------ audi
    ------ mercedes
    --- hypercars
    - trucks
    - bulldozers

    It seems impossible to achieve the same behavior after updating to 2.1.3. Now I can either make it always show ALL the categories (which is completely useless when you have a huge lot of them), or I can make it show only children and siblings for the current category. but it seems there's no way to show its ancestors and level-1 root categories at the same time (which is very bad for navigation).

    Any ideas?
    Currently rolled back to 2.1.2.

    https://wordpress.org/plugins/woocommerce/

  2. mikejolley
    Member
    Plugin Author

    Posted 5 months ago #

    This looks right to me. If you don't show siblings, it makes it really difficult to navigate around without going up to the top first.

    It does do what the option says - it only shows *children* of the cat you are on, not the children of siblings.

  3. eximido
    Member
    Posted 5 months ago #

    Yes, it probably does just what the option says.

    What I'm talking about is that there should be a way to show at the same time:
    1. children of the current category;
    2. siblings of the current category;
    3. hierarchy of the ancestors of the current category (i mean parent of the current cat, the parent of its parent and so on until the root category);
    In 2.1.2 everything worked exactly this way.

    Currently as of 2.1.3 we can list all the categories regardless of the current one or we can list only current category and its siblings/children. There's no way we could list parents of the current cat and include root categories like it was in 2.1.2.

    And I certainly didn't mention "children of siblings".
    Please look at the examples once again.

  4. mikejolley
    Member
    Plugin Author

    Posted 5 months ago #

    I've seen your examples; it works how we originally intended. If it did anything else prior, that was a bug (for the navigation reason I gave above).

  5. eximido
    Member
    Posted 5 months ago #

    Okay, I'll ask it in a different way then.

    Below are two screenshots of the product category widget from my development site. Both were taken on the same page (so the current category is the same).

    Please compare:
    1. Picture taken from 2.1.2: w212.png
    2. Picture taken from 2.1.3: w213.png

    How can I make the widget in 2.1.3 behave the same way it was in 2.1.2?

  6. mikejolley
    Member
    Plugin Author

    Posted 5 months ago #

  7. mikejolley
    Member
    Plugin Author

    Posted 5 months ago #

    I've closed it again. There is no issue here. I just setup a really complex structure with 2 top level, and multiple bottom levels.

    https://dl.dropboxusercontent.com/s/axpqqwlvi785pbn/2014-02-28%20at%2015.35.png

    One child 1 was current-cat here. Only it's children were shown and it kept its correct place in the hierarchy. I suspect you may have your widget styled wrongly making it appear wrong.

  8. miso00
    Member
    Posted 5 months ago #

    I also have problem with product category widget after update. Please return it to its previous state. All my categories and subcategories are showed (I have ticked Only show children for the current category). After update this widget started to behave wrong. Please return it back, it was flawless before update. Thank You a lot.

  9. Jomasher
    Member
    Posted 5 months ago #

    I have the same problem too: the category widget shows all the subcategories, no matter which option you choose in the category widget settings. The previous version worked so well, why change it?

  10. jrkellew
    Member
    Posted 5 months ago #

    Yes this update has seriously messed up the categories on our site too. Previously only the parent categories displayed on the main shop page and when you went to a parent category page, you were shown the children of that parent.

    Now the main shop page shows all categories, and when you click on a category page you are only shown child categories and nothing else.

    Screenshots:

    Before main shop: https://dl.dropboxusercontent.com/u/15222959/shop-main.png

    Before category: https://dl.dropboxusercontent.com/u/15222959/category.png

    After update shop main: https://dl.dropboxusercontent.com/u/15222959/updated-shop-main.png

    After update category: https://dl.dropboxusercontent.com/u/15222959/updated-category.png

    Is this a mistake or intended? If it is intended I would hazard to say that this will cause issues for a lot of sites and seems a much less intuitive way of presenting categories.

  11. fetchingprofile
    Member
    Posted 5 months ago #

  12. eximido
    Member
    Posted 5 months ago #

    mikejolley:

    I suspect you may have your widget styled wrongly making it appear wrong.

    I'm very curious how could I style that widget so "wrongly" that it doesn't show parents of the current category anymore even in HTML without any CSS.

    Your screenshot is similar to what I see in 2.1.2. I'd like to make it look the same way in 2.1.3, but I can't.

    I'm glad to see that there're other people with the same problem.
    Hope it will be fixed sooner.

  13. jrkellew
    Member
    Posted 5 months ago #

    Agreed with Exmido, it is not a styling issue as I have 2.1.2 running on my local server and on the main shop page, the ul that is generated for child categories is empty as intended. This is not the case in 2.1.3

  14. marcscheper
    Member
    Posted 4 months ago #

    I'm having the same issue, my menu doesn't work anymore as it did in previous versions.
    How can we get the previous widget back?

  15. he11f1re
    Member
    Posted 4 months ago #

    The functionality of the WooCommerce Product Categories widget has changed, the "Only show children for the current category" option now does exactly that. This is somewhat counter intuitive after the old way of working, and something is potentially broken as that setting seemingly ignores the "Show hierarchy" setting. Personally I would have done it a different way which didnt break sites that are already deployed and working as expected.

    Anyhoo, turn that setting off so you end up with a full menu showing all categories and all children as detailed in previous posts and apply the css below... problem solved.

    .product-categories .cat-parent .children {
    display: none;
    }

    .product-categories .cat-parent.current-cat .children ,
    .product-categories .cat-parent.current-cat-parent .children {
    display: inherit;
    }

    @mikejolly, woocommerce is fantastic (it owns virtuemart - which we used to use and support until its author started making bad decisions and being rude and arrogant in a public forum) and you are doing a great job, but please try and avoid breaking already deployed sites like this in the future, I appreciate you have changed behavior to what you deem to be correct behavior but some warning is always good, it took me a lot of head scratching to resolve the issue and looking back over it, its no wonder that you and everyone else on this thread were talking at crossed purposes.

    @everyoneelse, now ive hopefully given you an answer, you can all do me a favour by pushing for intrinsic wordpress functionality to diable plugin updates on a per user basis so I can prevent all my clients trying to be helpful and breaking all their sites at once overnight if something like this happens again....

  16. eximido
    Member
    Posted 4 months ago #

    he11f1re
    Thanks, I've just adapted your CSS to my theme's style, now the categories widget look almost like before the update, in 2.1.2.

    However this is not a solution, it's rather just a workaround.

  17. fetchingprofile
    Member
    Posted 4 months ago #

    I ended up using a "fold-able" categories widget plugin. Nice thing about it also, you can exude categories.

  18. marcscheper
    Member
    Posted 4 months ago #

    which one, fetchingprofile?

  19. fetchingprofile
    Member
    Posted 4 months ago #

    Collapsing Categories

  20. miso00
    Member
    Posted 4 months ago #

    After 2.1.4 update my product categories still not works well. When I set "Only show children for the current category" it show PRODUCT CATEGORIES DOESN'T EXISTS if I click on some main category. Anybody have this issue ?

  21. affiliater
    Member
    Posted 4 months ago #

    After update to 2.1.4 something else happened with the category tree...

    In my shop home i can see all the closed parent nicely up lined as they should.

    If i click on one of the parents only 5 other parents + the parent i clicked are still visible on the site, all the other categories disappears. The parent i clicked on is showing his subs and the other 5 are closed(not showing subs).

    I have in total 25 parent categories...

    Whyyyyyyyyyyyy??? This is sooooo frustrating!!!

  22. eximido
    Member
    Posted 4 months ago #

    That's very strange, but after 2.1.4 update on my development site it seems that category widget got back to normal as it was in 2.1.2. I have re-enabled "Only show children for the current category" and removed rules proposed by he11f1ire from CSS. And now it works as described in the first post of this topic again.

    Its weird that the widget still works differently for different people here.

  23. marcscheper
    Member
    Posted 4 months ago #

    The 2.1.4 changelog shows a Category widget ordering fix, but on my development site it still isn't working correctly
    On the Car Parts category page it should show:

    Categories
    
        Car Parts
            MK1 (Golf / Jetta / Caddy)
            MK2 (Golf / Jetta)
            MK3 (Golf / Jetta / Vento)
            MK4 (Golf / Jetta / Bora)
            Scirocco / Corrado
            Other
            Specials
        Clothing
        Accessoiries

    But instead it shows:

    Categories
    
        Accessoiries

    Then when i click on MK1 on the page itself, it shows:

    Categories
    
        Car Parts
            MK1 (Golf / Jetta / Caddy)
                Engine & Gearbox
                Suspension
                Brakes
                Wheel adapters
        Accessoiries

    So display seems to be completely random

  24. affiliater
    Member
    Posted 4 months ago #

    The collapse issue seems to be gone. I just wrote this to the woo team 2 min ago and waiting for an answer:

    Note: After update to 2.1.4 the collapsing problem was solved, but another issue came up instead.

    Here are all my main categories(Swedish):

    Lantliga möbler
    Soffor
    Stolar
    Bord
    Förvaringsprodukter
    Sovrumsartiklar
    Köksprodukter
    Badrumstillbehör
    Mediamöbler
    Mattor
    Belysning
    Tyger
    Inredningsdetaljer
    Fatboy
    Utomhusartiklar
    Eldfat & Eldkorgar
    Trädgårdsprodukter
    Dörrhandtag & beslag
    Tapeter
    Klockor
    Böcker

    If i click on any main category(in this example i clicked on "Stolar" 3:rd from the top), heres what happens:

    Badrumstillbehör
    Stolar
    -Moderna stolar
    -Korgstolar
    -Gungstolar
    -Matstolar
    -Fåtöljer
    -Pallar
    -Solstolar
    Fatboy
    Eldfat & Eldkorgar
    Tapeter

    Only 5 categories including the one i clicked are visible. It's always the same main categories that remains visible besides the one that are clicked.

    This issue occurs on all themes... And it started after the 2.1.3 update!

    Thanks!

  25. affiliater
    Member
    Posted 4 months ago #

    @ marcscheper
    We seem to share the same problem...

  26. miso00
    Member
    Posted 4 months ago #

    For those who are still having problems, try this if you didn't yet. At product settings you have to tick main category and all subcategories which belongs to particular product.
    I had this setting and had problems:
    SCREENSHOT
    Then tried this and widget works like before:
    SCREENSHOT2
    Hope this helps. It resolves my "No product categories exist" error. Before update the widget works good with settings from first screen but then something went wrong.

  27. affiliater
    Member
    Posted 4 months ago #

    I just installed the woocommerce 2.1.5 and updated my theme and everything else, but the category issue is still there.
    Has anyone came up with a solution yet?

    Thanks!

  28. affiliater
    Member
    Posted 4 months ago #

    Hi all
    I've spend over 4 hours narrowing down the problem with the categories and this is what i've came up with:

    Ok, my host makes automated backups every day so i managed to rollback the woocommerce plugin to v2.1.2 so the categories worked fine. Then i replaced all the files i thought had some influence on the category widget one by one until i got the category to work properly. (if you don't have backups you can probably download the v.2.1.2 from the woo site...)

    My result is that these two files are causing the problem

    /wp-content/plugins/woocommerce/includes/walkers/class-product-cat-list-walker.php

    and

    /wp-content/plugins/woocommerce/includes/widgets/class-wc-widget-product-categories.php

    If i copy/paste the content from the v2.1.2 to the v2.1.5 for those two files the categories work and looks as they should.

    To the woo team:
    Can you please have a look at this and maybe come up with a proper solution.

    Thanks guys!

  29. marcscheper
    Member
    Posted 4 months ago #

    Thanks, that's what i did now aswell.
    Still looking for a more permanent solution though

  30. affiliater
    Member
    Posted 4 months ago #

    @marcscheper Great!

    I spoke to a woo developer yesterday who said that they will definitely look in to the problem and release a solution. We can expect a solution any time soon now :)

    Have a nice weekend all!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.