• Resolved tatutre

    (@tatutre)


    Hi,

    I noticed that the plugin doesn’t allow selling the last item with the new WC 3.0. When the plugin is activated and there is only one product available the system shows the reservation countdown notice in the cart for the products but in addition the notice: “Sorry, “[product name]” is not in stock. Please edit your cart and try again. We apologize for any inconvenience caused.”

    It seems that the when the plugin reserves the product for the customer then the Woocommerce thinks that the stock is already zero for the product and thus displays the notice.

    Hopefully you can come up with a solution for this as now we can’t continue with the plugin and WC 3.0.

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

    (@jamesgol)

    I’m working on dealing with all of the 3.0 changes, but I haven’t noticed that issue yet. I’ve tried with Simple and Variable products with 0, 1, or large quantity of stock and haven’t seen that happen yet.

    Can you give me some more specifics to try to reproduce this issue?

    Thread Starter tatutre

    (@tatutre)

    Thanks for the quick response. You can check this demo site & product out https://rekkitest.demo.site/tuote/osaka-entry-tee-superdry/

    If you add it to the cart and then view the cart even though there is the one piece available. Actually all the products have only 1 unit in stock, so you should be able to add also other products. I’ve also flushed the cache and transients. Also testing with the standard WC storefront theme had the same issue.

    Plugin Author James Golovich

    (@jamesgol)

    Ahh, I see now. Somehow I missed that you said going into the checkout cart.

    Plugin Author James Golovich

    (@jamesgol)

    I see what’s happening now and it’s an easy fix, but to keep backwards compatibility with < 3.0 it is more complicated.

    Plugin Author James Golovich

    (@jamesgol)

    Was really hoping I could get a quick fix out right away but additional issues popped up as I was working on it. I’m going out of town tomorrow so I will have to jump back on this when I get back, I’d recommend sticking with WooCommerce 2.6.14 until sometime next week when I can deal with all of the issues.

    is there any temporary fix for this problem? i don’t want to downgrade to 2.6.xx

    Plugin Author James Golovich

    (@jamesgol)

    You could try editing my plugin file woocommerce-cart-stock-reducer/includes/class-woocommerce-cart-stock-reducer.php

    Line 396 is:
    $available = $this->get_stock_available( $product->id, $product->variation_id, $product );

    Change it to:
    $available = $this->get_stock_available( $product->id, $product->variation_id, $product, true );

    I can’t promise that this won’t break other things, and it definitely causes issues on < 3.0.

    I have same issue, i hope you can fiz that my friend, this plugin is essential for my client′s site!

    Thanks a lot!

    PS: I will try the solution above and will tell you if worked or crashed anything else..

    Thread Starter tatutre

    (@tatutre)

    Yeah, that would be nice if you can post if you find any new issues. I also tried the code snippet already and so far it seems to work without problems. Orders go through correctly and the product stock is updated the right way. So until James gets the final update to the plugin the snippet seems to work as a first aid. Thanks James!

    And it worked fine! if you want to check, https://www.tocadaarte.com.br

    Thanks a lot

    I’m here with the same woe after updating to WooCommerce 3.0.1. I can confirm the easy fix works well. Thank you for the prompt fix.

    Thread Starter tatutre

    (@tatutre)

    Yes, the snippet fixes the problem until it’s included in the plugin.

    Actually, my client told me that a lot of products srtated to get in “READ MORE” (out of stock) even after the time setted to come back as in stock…

    I will make some tests to see if he is right or was only the plugin working as it should do.

    Plugin Author James Golovich

    (@jamesgol)

    Spent some time adapting the code to WooCommerce 3.0 tonight and it’s almost there. Hopefully will be able to finish up tomorrow.

    The way the have changed everything will be much better in the long run.

    Plugin Author James Golovich

    (@jamesgol)

    I still need to do some more testing but if you would like to test the latest version, you can get it at https://github.com/jamesgol/woocommerce-cart-stock-reducer/archive/master.zip

    I’m going to do a bit more work and release a new version very soon.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Out of stock notice’ is closed to new replies.