Support » Plugin: WooCommerce Cart Stock Reducer » Out of stock products

  • Hello, I have one small and one big issue with stock management. We are using your great plugin from the very beginning and I am not saying that your plugin must be the source of the problems in these two issues but I am highly suspicious.

    First small issue is that I am not able to bulk edit or edit products in administration which are currently in basket. If I press save button (I tried mainly in bulk edit) than product which is currently in basket is becoming immediately out of stock so user is not able to finish the checkout process as it is saying product is out of stock. I am managing product stock with products and reducing it from 1->0 when someone buy it (I have just one piece per product).

    Second issue, which is much more critical, started two weeks ago. I would say from version 3.4 of your stock reducer plugin. Basically what is happening: just for SOME users when they are normally buying on FE of our store, they are able to put into basket 11 products (for example) and once they are trying to finish checkout then 9 products are saying they are out of stock. But we can see it in stock in administration at this point and on top of it if user on FE removes the product from basket and insert it again then it is ok.

    Do you have any idea if this can be caused by some of your latest changes in the plugin? For example by this change: Reduce time between checking stock and saving sessions (race condition between people adding same item to cart)

    Thank you very much for you help. I can’t see any error in the logs and we are not reducing products on FE by any other plugin then yours.

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

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author James Golovich

    (@jamesgol)

    I don’t use the bulk edit feature so I can’t say I’ve ever tried it, though I suspect I need to whitelist a function so it receives the actual stock quantity and not the virtual stock quantity. I’ll take a look at this.

    For your second issue I’m going to need more information. First off. What is ‘FE’? Are you able to reproduce this issue?

    What other plugins do you have installed? What type of products are these? Do you have any caching enabled?

    Plugin Author James Golovich

    (@jamesgol)

    I fixed an issue with ‘Quick Edit’ and ‘Bulk Edit’ changing the stock when items are in the users cart.

    This is in the development version on github and will be in the next released version.

    Thread Starter novasisdabest

    (@novasisdabest)

    For resolving the first issue: you are the best man!

    Info for the second issue:

    – we have just simple products where managing of stock is on and we always have just 1 piece in stock
    – we are using litespeed caching
    – FE stands for frontend of our eshop
    – these are plugins we have installed:
    Advanced Order Export For WooCommerce 3.1.9, Contact Form 7 5.4.2, Elementor 3.4.4, LiteSpeed Cache 4.4.2, Loco Translate 2.5.4, MC4WP: Mailchimp for WordPress 4.8.6, Redirection 5.1.3, Slider Revolution 6.5.6, User Role Editor 4.60.2,
    WooCommerce 5.7.1, WooCommerce Cart Stock Reducer 3.75,
    WooCommerce PDF Invoices & Packing Slips 2.9.3,
    Woodmart Core, WooSMS – SMS module for WooCommerce 2.0.31,
    WP Crontrol 1.10.0, WP Mail SMTP 3.1.0, Yoast SEO 17.3
    – I am not able to reproduce the issue and mainly appears in situations when we have 100+ concurrent users on web

    Thread Starter novasisdabest

    (@novasisdabest)

    But we have such traffic for very long time and issues started 2weeks ago.

    Plugin Author James Golovich

    (@jamesgol)

    Can you clarify what version you were using before 2 weeks ago when the problem started? 3.40 came out almost six months ago. 3.50 was almost a month ago, and 3.75 was two weeks ago.

    I haven’t tested with lightspeed cache but I’ll put it on my todo list.

    Plugin Author James Golovich

    (@jamesgol)

    Do you know which message is displayed on the cart/checkout when this problem happens?

    Thread Starter novasisdabest

    (@novasisdabest)

    I would say it was ver.3.5 when it was working fine last time (before my last update I did two weeks ago)

    The message is just saying product is Out of stock so it can’t be bought and user should remove it from basket. But as long as it is removed and added immediately again back than it is fine (for majority of cases)

    Plugin Author James Golovich

    (@jamesgol)

    That is not an error message I’ve ever seen come up. I’ll have to go digging to see the cause. There are normally 2 messages that could come up when an item stock is suddenly unavailable, but in those cases it is automatically removed from the users cart.

    Plugin Author James Golovich

    (@jamesgol)

    Looks like that type of error message is coming from ‘WooCommerce Blocks’. I’ve never used any of the block functionality so you’re in uncharted territory there.

    Thread Starter novasisdabest

    (@novasisdabest)

    Sorry what does it mean in practice? We did not activate WooCommerce Blocks (maybe our theme?). So it can’t be fixed or?

    Plugin Author James Golovich

    (@jamesgol)

    I’d try to revert back to the shortcode method of the cart/checkout pages.

    https://docs.woocommerce.com/document/cart-checkout-blocks-support-status/
    https://docs.woocommerce.com/document/using-the-new-block-based-checkout/

    Perhaps your timeline when the problem started coincides with someone enabling these blocks?

    Thread Starter novasisdabest

    (@novasisdabest)

    We did no change on our side. We just updated few plugins considering last month period but nothing related to WooCommerce Blocks. We just updated standalone WooCommerce plugin.

    Plugin Author James Golovich

    (@jamesgol)

    I’m not sure what to tell you. From your report you claim it is saying “product is Out of stock so it can’t be bought and user should remove it from basket”. The only place in WooCommerce that has a message like that is from the cart block.

    https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/trunk/src/StoreApi/Utilities/CartController.php#L254-L304

    If it was me, I would check to see if it is in fact using the cart block or what the actual error message is.

    The exact error message will help point out where to investigate.

    Thread Starter novasisdabest

    (@novasisdabest)

    I’ve reviewed screenshots from client who complained and it is this error:

    #. translators: %s: product name
    #: includes/class-wc-cart.php:768
    msgid “Sorry, \”%s\” is not in stock. Please edit your cart and try again. We apologize for any inconvenience caused.”
    msgstr “Omlouváme se, ale \”%s\” nemáme skladem. Upravte obsah košíku prosím a zkuste to znovu. Omlouváme se za způsobené nepříjemnosti.”

    I will try to use any of your older versions of your plugin.

    Thread Starter novasisdabest

    (@novasisdabest)

    I installed 3.4 version and we have huge selling peak tonight on our eshop so it will be tested on this high load of orders.

Viewing 15 replies - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.