• Resolved cjholdsworth

    (@cjholdsworth)


    Hi Brain Trust,
    I have a WooCommerce installation that utilises product attributes.

    For whatever reason WooCommerce creates the Attribute and its variations and marks a product correctly with the Attribute but the Attribute count is wrong.

    Our website is a jewellery store.

    As an example I have a Product attribute called ‘Metal’. there is a series of different metals of which one is ‘tantalum’. If I go to Products->Attributes…Metal and click on Configure Terms it will show me ‘Tantalum’ as an attribute (of Metal) and a Count of 0. However if I click on that 0 it loads a page containing 9 items with tantalum.
    http://www.holdsworthbros.com/metal/tantalum/

    I have tried ‘regenerating product lookup tables’ and ‘resetting term counts.’

    It matters because we use a plugin WOOF to provide filters, but if the product counts are wrong then WOOF doesn’t work.

    I am thinking about deleting all the attributes and starting again, but that seems like a hardcore option that might backfire impressively.

    Thanks Guys.

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • con

    (@conschneider)

    Engineer

    Hi there,

    If I go to Products->Attributes…Metal and click on Configure Terms it will show me ‘Tantalum’ as an attribute (of Metal) and a Count of 0. However if I click on that 0 it loads a page containing 9 items with tantalum.

    You mean this here: https://d.pr/i/eXCsdx – correct?

    However if I click on that 0 it loads a page containing 9 items with tantalum.
    http://www.holdsworthbros.com/metal/tantalum/

    It should load a backend page: https://d.pr/i/401WUL
    Do you also get that backend page? Should be something like: /wp-admin/edit.php?taxonomy=pa_metal&term=tantalum&post_type=product

    Kind regards,

    Thread Starter cjholdsworth

    (@cjholdsworth)

    Hello,
    Thank you so much for your reply!

    You mean this here: https://d.pr/i/eXCsdx – correct?

    Yes, Attribute-Metal->Tantalum has a count of 0
    https://www.holdsworthbros.com/wp-content/uploads/2020/08/MetalsTantalum.jpg

    It does load the backend page – exactly as you described, but with the 9 items in it.

    https://www.holdsworthbros.com/wp-content/uploads/2020/08/MetalsTantalumProducts.jpg

    And I don’t know why 🙁
    Kind regards,
    Chris.

    con

    (@conschneider)

    Engineer

    Hi again,

    Tantalum has a count of 0. It does load the backend page – exactly as you described, but with the 9 items in it.

    Ok weird ;).

    Can you try the following.

    * Go to /wp-admin/admin.php?page=wc-status&tab=tools
    * Hit this: https://d.pr/i/rE8Hvk

    Does that change anything?

    Kind regards,

    Thread Starter cjholdsworth

    (@cjholdsworth)

    Hi Con,
    I did try that before, and I have tried it again now. It hasn’t changed anything unfortunately.
    I also tried to ‘regenerating product lookup tables’ but that didn’t change anything either.
    Thank you for your continuing help.

    Thread Starter cjholdsworth

    (@cjholdsworth)

    Hi Con,
    Did you have any further ideas? Can I give you access to see the issue for yourself?
    Kind regards,
    Chris.

    Hi @cjholdsworth ,

    We may need to take a closer look. Please contact us at WooCommerce.com > My Account > Tickets. You may need to create an account before you can access that page.

    Please include a link to this forum thread, so that we can keep track of what’s already been done.

    We will be able to help you further there.

    I have the same problem.
    I’ve also recounted the terms but with no luck.

    Did you solve this issue?

    Thread Starter cjholdsworth

    (@cjholdsworth)

    No, its not solved. I haven’t performed the following which was recommended to me…

    Hi Chris,

    Thanks for those credentials. I was able to log in and check some things on your site. I also tried:

    Recounting terms (WooCommerce > Status > Tools > Term counts > Click – Recount Terms (Button on right))
    Rebuilding the product lookup table again (WooCommerce > Status > Tools > Product lookup tables > Click – Regenerate (Button on right))
    Checking for any errors coming from these updates under WP Admin > WooCommerce > Status > Logs

    I wasn’t able to get the attribute count to change, and I see that there are other attributes acting the same way:

    Image Link: https://d.pr/i/3Sg59f

    For each of those, I could see products listed when I click on the zero.

    Is there anything about the products with those attributes that are different from the products with the correct counts appearing? If they’re using a particular feature, that may help us narrow this down.

    Conflict Testing

    If that doesn’t identify the issue, this may be caused by a conflict with your theme or with another plugin. In this case, it may be a plugin or theme conflict interfering with the proper operation of the product lookup tables rebuild or the term count checks. I’d recommend cloning your site to a staging environment and performing the following tests without modifying your live site or impacting customers. Many hosts provide staging facilities, so it’s worth checking in with them. It’s also possible to do it using the free WP Staging plugin.

    On that site, deactivate all plugins on your site except WooCommerce and switch to a default theme like Storefront or Twenty Twenty. Then, use the Recount Terms and Regenerate product lookup tables tools to regenerate everything (That last one does take some time to regenerate everything. You can check the status of the process from your Scheduled Actions tab. That link will take you directly to the running processes for this tool, or you can navigate to WooCommerce > Status > Scheduled Actions > Pending and search for wc_update_product_lookup_tables).

    If that sets the right counts. Enable your theme and plugins one at a time, checking to make sure the counts stay correct as you go. If everything goes back to 0 again, then that plugin is causing the issue.

    Next steps

    Let us know if it still doesn’t work with the other plugins deactivated or if you need any further assistance.

    Also, I see that you’re using the Stripe extension. That actually qualifies you for WooCommerce.com support, so you can get assistance via our support page any time.

    Best,

    Mike S – Happiness Engineer

    Thread Starter cjholdsworth

    (@cjholdsworth)

    @tyfricko
    I’ve not solved this but I’ve found a work around that worked for me.

    Go to Products/Attributes

    Click ‘Configure terms’ (in an attribute that is counted incorrectly)

    Click on the ‘Count’ column for a term that is counted incorrectly (in my error the count would be 0 but I would have way more than zero products that listed when I did this)

    Click ‘Edit’ on any product in that list.

    Click Publish/Update.

    In my error this would then correctly count every product in that Attribute/term. I then needed to do that for every term of every attribute to get all the counts correct.

    Hope this helps you and someone else, so frustrating!

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

The topic ‘WooCommerce product attribute count is wrong’ is closed to new replies.