Major bug in product inventory status
-
Before I proceed I would like to draw your attention to this post:
Stock status changes in quick edit | www.ads-software.com
A couple of years ago someone had reported that a Chrome add on was able to ruin the product stock when quick edit was used (for other matters).
In our case, for since December, we were beta testing a brand new product filter – by far the fastest in the Woocommerce ecosystem – Fibofilters (by the makers of fibosearch).
During our tests we were noticing that some categories were getting “corrupted” products that we supposed to be showing in the categories were not there.Following extensive debug (over 100 hours spend in debugging as well as developing methods for debugging) we noticed that were discrepancies between the stock as in post meta table vs the value for the stock in the term relationships table.
So something was not quite right.
Following investigation with the clients staff that do the data entry, we were told that at times, are using quick edit to edit simple products.
It appears to us, with great certainty, that the quick edit causes issues in the stock of the product that lead to these bug in the sense of the deviation of the stored stock value in the post meta vs the relationships. There may also be a bug pertaining to changes of multiple products in the admin panel.
Please examine further, as this is a major issue.
Having spend 100s of hours in trying to both identify the issue as well as in dealing with a disgruntled client that their products were disappearing from their eshop as if by magic, I think it is about time for the WooCommerce team to do their magic and resolve the issue.
The argument in the original post I shared that well, this is something that has to do with an add on of chrome just doesn’t cut it.
Thanking you in anticipation.-
This topic was modified 11 months, 2 weeks ago by
Oxford Metadata Ltd.
-
This topic was modified 11 months, 2 weeks ago by
Oxford Metadata Ltd. Reason: spelling corrections
-
This topic was modified 11 months, 2 weeks ago by
-
Just to add to this that the bug is repeatable and more pronounced (thus I guess irrelevant to the existence of other browser add ons) when one does bulk editing of products that are both simple and variable.
May I suggest to the team to check the following scenarios.
1. What happens when you bulk/edit update product categories of mix products (both simple and variations) without doing anything to the stock (are there discrepancies in the postmeta and term relationship tables regarding stock?2. What happens when you bulk/edit update product categories of a mixed bag of products (i.e. both simple and variations) and attempting to alter :
a. Stock status (does this propagates to all variations of the variable products? If so, assuming that you make the products as in stock, what happens to a variation that has 0/negative stock?). Are the term relationships updated according to the introduced change?
b. Stock quantity. For example, can you set the selected products as out of stock with one click, e.g. set the number to -5 ? If so, and you are able to change the quantity to the specified level for both simple and variable products, do the stock status for all simple products, all variations and the parent variation change correctl together with the in stock/out of stock status? Do the term relationships regarding stock are getting updated correctly?Somewhere there you will find the issue.
-
This reply was modified 11 months, 2 weeks ago by
Oxford Metadata Ltd. Reason: further clarification
Hey there, @oxfordmetadata! Thanks for contacting us. I’m happy to help you.
Thank you for the extensive testing.
To confirm, the steps you shared in your second message, are they the ones to follow to replicate the issue? I mean, if you follow those steps, are you able to replicate the issue consistently on your site?
If not, what are the steps you take on your end to replicate the issue so we can also try them on our end?Are you able to replicate this issue while having only WooCommerce active and the Storefront theme?
Do you mind sharing more specific details on the discrepancies you saw? If screenshots are helpful, feel free to share them with us. I recommend using https://snipboard.io. You can share the direct link to the image as a response to this topic.
This information will help us investigate this further.
Looking forward to your reply.
Have a wonderful day!
Hello, with reference to the original post (that it may be various add ons that are causing the issue during bulk editing), the client informed me that they are using the “Kaspersky Protection” Chrome add on (while some of are also using “Avast OnLine Security and Privacy”).
The huge discrepancy though as far as our filter was concerned cames in the form of the following two scenarios (as we were informed by the FiboSearch/FiboFilter team):
“.. went through more than 30 cases with different stock management and quantity combinations. The weird behavior occurs in these two cases:
?
– A parent has enabled stock management and quantity is more than 0. All variations have enabled the “Manage Stock?” option and quantity is set to 0 or negative.
– A parent has enabled stock management and quantity is 0 or negative. The option “Allow backorders?” is enabled. All variations have enabled the “Manage Stock?” option and quantity is set to 0 or negative.
?
In these two cases, WooCommerce does something wrong. WooCommerce shows such products in the catalog, but it shouldn’t. We will try to create a “pull request” in the WooCommerce Github repository, but the temporary solution is another. We have a troubleshooting section in FiboFilters settings. We will analyze shop products in order to find these two cases. If we find something, we will show a message in the troubleshooting section with an explanation and guide on how to fix it manually by shop managers.?“
So there may be just the case that it was not the bulk insert “bug” due to the add ons but the fact that during bulk edit of say simple products they had in their basket variable products, with the discrepancies in those two scenarios.
I think you should help us answer these questions too. i.e.
1. The “parent” abstraction has no physical reciprocal, so no stock value ought to be there, nor price nothing. Why in a variable product that parent can have the option to monitor stock?
2. When the parent has activated the stock and it is negative, whereas one of the variation has stock activated and it is positive what is supposed to happen?
3. When the parent has activated the stock and it is out of stock (and/or 0 negative), whereas one of the variation has stock activated and it at least one has a positive what is supposed to happen?
4. In bulk editing, assuming that we have a mixed basked of simple and variable products. If I have disabled the stock in the variable parent and say that I set the stock status to “in Stock” and the stock value to 5, will these values propagate to all variations of the selected bouquet of products in my bulk editor?
If we get these answers, it will be a good starting point, because right now we think that even if we ask the client to give us those videos, we will have no clue about to what is supposed to happen and we will be making fools of ourselves.
Thank you,
Dimitris
PS. Just to add that me thinks that in the second case reported by the Fibo team (when the backorders are enabled) the products ought to be observable in the catalogue as if they are in stock. The stock status ought to be irrelevant. But in the first example, if confirmed, they have a huge case (that led me to the my own four questions).-
This reply was modified 11 months, 2 weeks ago by
Oxford Metadata Ltd. Reason: Addendum with clarifications
Hi @oxfordmetadata,
We acknowledge the in-depth investigation you’ve conducted with the Fibofilters team.
The “parent” abstraction has no physical reciprocal, so no stock value ought to be there, nor price nothing. Why in a variable product that parent can have the option to monitor stock?
The parent product in WooCommerce doesn’t have a physical stock or price because it’s essentially a container for variations. However, the option to manage stock at the parent level is there to allow for backorders and to show the product as “In Stock” or “Out of Stock” based on the stock status of its variations.
When the parent has activated the stock and it is negative, whereas one of the variation has stock activated and it is positive what is supposed to happen?
If the parent product has stock management enabled and the stock is negative, while a variation has stock management enabled and the stock is positive, the product will show as “In Stock” in the catalog if at least one variation has positive stock.
When the parent has activated the stock and it is out of stock (and/or 0 negative), whereas one of the variation has stock activated and it at least one has a positive what is supposed to happen?
If the parent product has stock management enabled and it’s out of stock (or 0/negative), and at least one variation has stock management enabled and a positive stock, the product will display as “In Stock” in the catalog.
In bulk editing, assuming that we have a mixed basked of simple and variable products. If I have disabled the stock in the variable parent and say that I set the stock status to “in Stock” and the stock value to 5, will these values propagate to all variations of the selected bouquet of products in my bulk editor?
During bulk editing, if you have a mix of simple and variable products and you set the stock status to “In Stock” and the stock value to 5, these changes will not automatically propagate to all variations. You would need to update each variation manually.
I hope this clarifies your concern. If you have any other questions, feel free to ask.
Hi @shameemreza,
Thank you for the reply, yet it does not answer the essence of the question.
If, as you imply, when at least one of the variations has positive stock, it will win over the stock of the parent what is the point of enabling the users to set the parent stock, if not to merely have the illusion that they have set up their products as “out of stock” but they are still visible? I can understand – for performance reasons, to have a hidden field that monitors the stock of all variations and if positive to help you display this product as in stock (rather than computing the stock of say 200 variations all the time), but I do not think that this helps. And if you think that 200 variations is an exaggeration, take a look in this product: Aloha Ημιμ?νιμο Βερν?κι Eight Color Coat 8ml – Femme Fatale (femme-fatale.gr) in one of our clients (btw this eshop has 100s of attributes and remains one of the fastest around – Latest Performance Report for: https://femme-fatale.gr/product/nychia/imimonima-vernikia/xromata/aloha-imimonimo-verniki-eight-colo… | GTmetrix – 1.2s / 100% with 268 variations ).
The second argument about backorders, again the backorders are bound to be variation specific and not product specific. In the example I shared with you the merchant wants to allow backorders but for specific variations, because some of the colours are out of fashion and will never be made available again (or is just impossible to get), whereas for other colours wants to allow backorders because they are temporarily out of stock. Generally, notions like backorders have to have a physical reciprocal, not an abstraction, because issues like this arise.
With regards to the bulk stock update, it will be great if again, you allow for the propagation of the values to all variations, should the user wants to use this feature. It is not only a good practice for usability/productivity but it also provides consistency. That is you know that when you set a (variable) product as out of stock, it will definitely be out of stock. (Mind you many themes, unlike ours, do not show in image swatches if a specific variation is in or out of stock). Maybe this explains why in our case we noted inconsistencies between the values stored in postmeta vs the values stored in the termrelationships tables regarding the stock.
The issue was (is) “somewhere” still around. You see, our problems, were not because we had undue display of the products in the catalogue but the contrary. Products were disappearing from the catalogue, although variations and even parent products were saying that something is in stock.
Maybe this is because there is the scenario that was not addressed. If all the variations are negative and the parent is positive what will happen? What if the end users forgot to set the stock at all the variations, and suddenly someone sets (during bulk edit) the stock of the parent to negative, it is bound to disappear (whereas originaly,was appearing by accident actually). I am saying this because we have seen this behaviour as well (staff forgetting to set the stock while setting the variations – they just couldn’t think that monitoring of the stock in parent level has no substance – as you may be in stock overall, but not for the specific colour that the customer wants).
I hope my thoughts will be taken further. We are investing a lot of time and effort in optimizing wordpress/woocommerce for our clients and we feel that variations is the way to go. Especially for those of us involved with meta analytics of the sales, behaviourals and our own product recommendation engines.
Thank you!Hi @oxfordmetadata,
Thanks for sharing further details.
If, as you imply, when at least one of the variations has positive stock, it will win over the stock of the parent what is the point of enabling the users to set the parent stock, if not to merely have the illusion that they have set up their products as “out of stock” but they are still visible?
The parent product’s stock management for enabling stock management at the parent level is to provide an overall view of the product’s stock status. It’s not meant to override the stock status of individual variations, but to provide a general indication of whether the product, as a whole, is available or not.
The second argument about backorders, again the backorders are bound to be variation specific and not product specific.
You’re correct that they are typically variation-specific. However, the option to allow backorders at the parent level is there to provide a default setting that can be overridden by individual variations.
With regards to the bulk stock update, it will be great if again, you allow for the propagation of the values to all variations, should the user wants to use this feature.
We understand the convenience of having changes propagate to all variations. However, due to the unique nature of each variation, it’s currently necessary to manually update each one. We are always looking to improve the usability of WooCommerce, and your feedback on this matter is appreciated.
Products were disappearing from the catalogue, although variations and even parent products were saying that something is in stock.
This could be due to a discrepancy between the parent product’s stock status and the stock status of its variations. If a parent product is marked as in stock, but all its variations are out of stock, it should still appear in the catalogue. However, if the parent product’s stock status is set to out of stock, it will not appear in the catalogue, even if some variations are in stock.
I hope my thoughts will be taken further. We are investing a lot of time and effort in optimizing wordpress/woocommerce for our clients and we feel that variations is the way to go. Especially for those of us involved with meta analytics of the sales, behaviourals and our own product recommendation engines.
We understand the importance of variations for your business and are committed to helping you optimize your use of WooCommerce. Your feedback is invaluable to us and it would be great to have you add your ideas as a feature request, which is where developers go to look for future plugin features and improvements. You can even submit an enhancement request to your GitHub repo too.
I hope this provides some clarity. Please let us know if you have any other questions!
Thank you very much @shameemreza for your reply.
It looks like the development of this feature is in the right hands ??
When I find the time I will write a feature request, but, sadly, it is common for features coming out of the blue to be have an unfortunate fate. I cannot re-tell the story, re-explain etc. You are the owner of this feature, you now know the story, and please take it further with your team; they know you better and trust you a lot more than me.
I will just add two anecdotes.
1. The other day, I was sharing with the shop owner some of my dialogues with the guys at Fibosearch. He came back saying that “if there are so many “ifs” and “buts” enough to confuse Oxford educated computer scientists, how my girls (who do the data entry) who have barely finished High-school can know what to do without mistake?”
2. In here you will find a chart with the positive impact of moving the site to Woocommerce. Being like 10times faster than the previous (Magento) in March 2022, and also optimising the product catalogue (moving the simple products to variations in May 2023 (March-April 2023 there is a steep drop due to price increases of the products by about 15%)). The caption explains it all.
What I try to say is that what you are doing it matters – a lot actually. Sadly, it matters most to people who will remain unaware/oblivious of the impact of your choices to them (e.g. you can imagine that the owners of eshops are not happy with their staff when products “disappear”).
Anyway, these are nice stories to tell, and if I was Woocommerce, I would have publicized such case studies – success stories so to speak, as a means of compensating my partners who add value to my product, trying to make them even better.
Keep well – thanking you once more,
Dimitris.-
This reply was modified 11 months, 1 week ago by
Oxford Metadata Ltd. Reason: spelling
-
This reply was modified 11 months, 1 week ago by
Oxford Metadata Ltd. Reason: further corrections
-
This reply was modified 11 months, 1 week ago by
Oxford Metadata Ltd. Reason: famous last words :)
Hi @oxfordmetadata,
Thank you for your thoughtful response and the insightful anecdotes you’ve shared. We completely understand the challenges you and your team are facing, and we appreciate your patience and feedback.
We’re glad to hear about the positive impact of moving your site to WooCommerce and your success with optimizing your product catalog. It’s always rewarding to hear about our users’ success stories and how WooCommerce has contributed to their growth.
Your feedback is invaluable as we continue to improve and develop WooCommerce (please submit it as a feature request). We hope to continue providing you with a platform that meets your needs and contributes to your success.
Meanwhile, I will mark this thread as resolved. Should you have further inquiries, kindly create a new topic here.
Thank you once again for your time and feedback.
Thank you. Somehow I am unable to do a feature request. I tried it, I can login, I can upvote and comment but when it comes to posting a new feature request it keeps telling me to log on.
Please do it on my behalf and I will second it.
Btw. here is the latest performance of that product with those 268 variations is down to 0.8s ??
Latest Performance Report for: https://femme-fatale.gr/product/nychia/imimonima-vernikia/xromata/aloha-imimonimo-verniki-eight-colo… | GTmetrix
Also note that this topic… has been taking over by the Fibofilters team here: Hide out of stock items from the catalog – the case where it doesn’t work | www.ads-software.com-
This reply was modified 11 months, 1 week ago by
Oxford Metadata Ltd. Reason: added new link
Hello @oxfordmetadata,
Please do it on my behalf and I will second it.
I’m afraid we are unable to do feature requests on behalf of merchants as this does not conform with our policy. Only merchants are supposed to make feature requests. Could you please try using a different browser to check if you are still unable to do the feature request?
Btw. here is the latest performance of that product with those 268 variations is down to 0.8s ??
Glad to hear this – thank you for updating us. If you have a few minutes, we’d love if you could leave us a review.
All the best.We have some news for you @ckadenge and @shameemreza – you may find this topic both interesting and extremely relevant.
https://www.ads-software.com/support/topic/issue-with-dynamic-update-of-wp_wc_product_attributes_lookup
It will be great if that issue gets sorted too, because it has to do with the core of woocommerce. In our case, we invested months (together with the team at Fibosearch/Fibofilters) to make the fibofilters more robust, to just realised that:
1. The rules are open to misinterpretation.
2. Thanks to the efforts of the fibosearch/fibofilters team @damian-gora we realised that wp_wc_product_attributes_lookup is getting corrupted during dynamic repopulation in shops that have 1000s of attributes (in products that have 100s of attributes).-
This reply was modified 11 months, 1 week ago by
Oxford Metadata Ltd. Reason: spellings
Hello again @oxfordmetadata,
We understand that you have put a significant amount of time and effort into making the fibofilters more robust, and it’s unfortunate to hear about the issues you’re experiencing.
Misinterpretation of rules and corruption of the wp_wc_product_attributes_lookup during dynamic repopulation are indeed serious concerns, especially for shops with a large number of attributes.
We appreciate you bringing this to our attention. As you’ve already opened a separate thread for it, our team will reach out and assist you further.
Cheers.
-
This reply was modified 11 months, 2 weeks ago by
- The topic ‘Major bug in product inventory status’ is closed to new replies.