• Resolved mstudioeu

    (@mstudioeu)


    Hello team,

    I just imported a product sheet with a couple of hundreds of products into a website. The site has an extensive category hierarchy: a lot of categories with subcategories and also subcategories of the subcategories, e.g.:

    Supplements (parent category) > Vitamins & Minerals (subcategory of parent category) > Vitamins (subcategory of subcategory).

    Many products are added into multiple categories and subcategories.

    In the website itself, everything is working fine from what I can tell, HOWEVER:

    1. I noticed that in the WooCommerce > Categories area it shows there are 0 products in all parent categories and subcategories, whereas the product is listed only in the “bottom most” level of the hierarchy, i.e. in the sub-subcategory (the subcategory of a parent category subcategory), or following the above example, a product uploaded in this hierarchy:

      Supplements (parent category) > Vitamins & Minerals (subcategory of parent category) > Vitamins (subcategory of subcategory)

      shows only in the “Vitamins” subcategory of the “Vitamins & Minerals” subcategory. This means that the parent category and the subcategory (or “Supplements” and “Vitamins & Minerals” respectively) show there are NO matching products in this area.
    2. If you open the All products view however and use the “Select category” dropdown and you select either “Supplements” or “Vitamins & Minerals”, it shows the product – hence, it works correctly.
    3. If you open the direct parent category (or even subcategory) link, again it shows the product – so this works well too.
    4. If you edit the product (or quick edit it), from the “Product category” options to the right it shows that the product is NOT added to the top levels of the hierarchy (parent and subcategory of the bottom most level of the hierarchy) – or, following the example above, it shows that the product X added to the subcategory “Vitamins” is NOT in the subcategory “Vitamins & Minerals”, which itself is a subcategory of the parent category “Supplements”.

      Now this is not the biggest issue as everything is working well in the front end for customers, but it is a problem for my client as they manage an extensive store with hundreds of products. When managing such a large store, it’s confusing that product X is shown as NOT being in category X, although it is there and it’s also showing there in the frontend.

      I tried deactivating all plug-ins on the site, running WP 6.5. and also uploaded the product sheet on a clean TasteWP installation. The issue can be reproduced, so it doesn’t seem like a site-specific issue or one resulting from a conflict. I’m using the latest WooCommerce version as well. I’m happy to provide anything else that may help debug this, including a step-by-step video and even access to a staging website.

      Thank you in advance for your attention and assistance!
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter mstudioeu

    (@mstudioeu)

    Update:

    I manually added a product into the entire category hierarchy and tried exporting it into a spreadsheet to see the syntax, and indeed I noticed a difference in the syntax.

    Following the above example, in my sheet in the categories column “Product X” which is part of parent category Supplements > Vitamins & Minerals (subcategory of parent category Supplements) > Vitamins (subcategory of subcategory Vitamins & Minerals) was added in the like this:

    “Supplements > Vitamins & Minerals > Vitamins” (without the quotes), as it makes sense that if a product belongs to the subcategory of a subcategory of a parent category, then it naturally also belongs to both the top level subcategory and the parent category.

    In the exported sheet however I noticed a duplication in the syntax that included adding all separate levels separated by a comma, like so:

    “Supplements, Supplements > Vitamins & Minerals, Supplements > Vitamins & Minerals > Vitamins”.

    If it didn’t work correctly in the front end, I would have thought it’s my fault for filling in the spreadsheet incorrectly. But isn’t it logical that if a product belongs to a subcategory, then it naturally also belongs in the parent category too? It would take a lot more time to input hundreds of products like this, as in the example above, I’d need to make three separate equations instead of one.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello mstudioeu

    Thank for your contacting WooCommerce.

    You have explained your problem very well.
    Excellent work there!

    Could you please share the CSV of your products with me?
    I want to import it on my test site and try to recreate the issue.
    This will allow me to analyze the problem and find out a solution.

    I look forward to your response. ??

    Best regards.

    Thread Starter mstudioeu

    (@mstudioeu)

    Hello Zubair, thank you very much for getting back!


    Upon investigating further, I came to realise the problem can be replicated on other sites too.

    I’ll be happy to share the .csv, can you please direct me to the best way to do this and I’ll share it right away?

    Hey, @mstudioeu!

    You can upload it on a site such as Google Drive, Dropbox, Quickforget, etc, and share the link here so we can download it.

    Can you also please share the System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support so we can take a look?

    Looking forward to your reply.

    Have a wonderful day!

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Issue with category hierarchy display in backend’ is closed to new replies.