• Resolved majdaburas76

    (@majdaburas76)


    I’m a wholesaler and this plugin is crucial for my business, my vendors order a lot but they ship only one time a week, so I treated the cart page as an orders page and the checkout as a shipping page, all that was possible by this powerful plugin which reduces stock magically when item added to the cart. but I’m experiencing a huge problem with it, it’s the negative stock, I have the woocommerce extension stock manager so I can see clearly a lot of products (simple and variable) had negative stock. this caused issues like vendors being unable to proceed the order until they delete the out of stock item, how could an out-of-stock item be on the cart page in the first place? is that part of the problem or another one Idk, I tried so many ways to fix that like deleting other plugins that could cause this issue or managing woocommerce cookies in an advance way & increasing the cache period, and more!! but it seems not enough, the negative stock happens sometimes not always. the backorders are disabled, and it seemed nothing I could do.
    To summarize the problem: out-of-stock items in the cart page & Negative stock, I will appreciate any idea I can apply

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

    (@jamesgol)

    When you first installed and activated this plugin did you clear all of the existing carts?

    You’re going to have to give some more specific details if you need some assistance. Screenshots of the config, screenshots showing the issue and any error messages.

    Thread Starter majdaburas76

    (@majdaburas76)

    Thanks for the fast reply
    I did clear the carts by the plugin cart reports at the start, I’ve been using this plugin for a month not new here, The negative stock nope the whole problem happened when I started using this plugin
    you mean by the config the config.php file, right? here it is
    the error message is in Arabic, in the backend: “Sorry, we do not have enough “%1$s” in stock to fulfill your order (%2$s available). We apologize for any inconvenience caused.”
    and another one:
    “You cannot add “%s” to the cart because the product is out of stock”
    these Two error messages appeared on the checkout page when proceeding the order
    something I have to mention the website getting a decent amount of traffic, about 300 active visitors, so there are so much add to cart events about 1000 a day

    • This reply was modified 1 year, 10 months ago by majdaburas76.
    Plugin Author James Golovich

    (@jamesgol)

    You might want to edit your post, you leaked passwords and keys in there.

    Plugin Author James Golovich

    (@jamesgol)

    The config I was referring to is the plugin config on the WordPress backend.

    Thread Starter majdaburas76

    (@majdaburas76)

    Ohh! thank you, how I can provide the config you want, until now are you familiar with the problem and these error messages?

    Plugin Author James Golovich

    (@jamesgol)

    Take a screenshot of the config. I’ll see if there’s anything obvious there, but these issues can get pretty complicated especially if there are other WooCommerce related plugins that are adjusting the stock quantity.

    Thread Starter majdaburas76

    (@majdaburas76)

    where is the config file located in the plugin folder? am I searching in the wrong place?
    there is no other plugin that could affect woocommerce inventory

    Plugin Author James Golovich

    (@jamesgol)

    The config is done through the WordPress backend. WooCommerce->Settings->Integration

    Thread Starter majdaburas76

    (@majdaburas76)

    https://freeimage.host/i/HacSrzu
    and the negative stock in the backend:
    https://freeimage.host/i/Hac6C8l

    • This reply was modified 1 year, 10 months ago by majdaburas76.
    Plugin Author James Golovich

    (@jamesgol)

    Most people use this plugin with expiration enabled, otherwise a malicious user can lock out all items just by adding them to a cart.

    There must be a plugin or theme conflict causing the negative number. This plugin does not modify the database in any way, it just creates a virtual quantity by counting the items in carts.

    Some other plugin is saving this virtual value to the database. There are filters to work around these issues but you need to determine what function is doing it.

    Thread Starter majdaburas76

    (@majdaburas76)

    thank you man for your time with me I really appreciate it, you helped me a lot. I don’t have to worry about the malicious user I restrict access to all visitors except the logged in users. if the expiration date could be useful to my issue then I will enable it.
    you said something about this plugin’s functionality and the plugin does not modify the database so the negative stock is caused by another plugin or theme.. are you sure about this? at first, I thought the issue was caused by the cookies you know it stored in the browser, so if I find a way to store woocommerce data in the cloud, that could solve the issue, is my thinking could be right? from your experience could the problem be caused by cookies or caching management? remember out of stock items were on the cart page isn’t this so weird? what kind of plugin or situation could cause something weird like this, what can you advise me to look at in finding the solution? all I have to do to change the theme and deactivate some plugins right?
    sorry for asking too many questions, to summarize: 1- I’m asking you again if the negative stock is surely caused by another plugin theme, 2- could the cookies & cache cause issues like negative stock technically? 3- out of stock items on the cart page!! how is that could be possible? by a plugin, database theme?!

    • This reply was modified 1 year, 10 months ago by majdaburas76.
    • This reply was modified 1 year, 10 months ago by majdaburas76.
    Plugin Author James Golovich

    (@jamesgol)

    This plugin does not modify the stock quantity in the database in any way. It does modify several WordPress filters that return what the stock is and if an item is in or out of stock.

    What is likely happening in your case is some other plugin is taking the virtual stock value and saving it in the database. To work around this issue there needs to be a specific function set to receive the actual stock instead of the virtual stock, but figuring out the conflict can be time consuming.

    Caching can cause some odd issues, but not a negative stock issue.

    Thread Starter majdaburas76

    (@majdaburas76)

    I will mark this as resolved, thank you bro you are a great person

    Thread Starter majdaburas76

    (@majdaburas76)

    You are right another plugin who caused this, the woocommerce extension cart reports caused the issue, I already deactivated to see if that fix it in the past but nothing change, Now I deleted it and everything works properly, unfortunately I paid for this plugin but it’s not crucial as yours, thank you again

    Plugin Author James Golovich

    (@jamesgol)

    If you send a copy of that code to <[email protected]>, when I get some time I’ll see if I can figure out a workaround. Sometime’s it’s as simple as allowlisting one function.

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