• Resolved znqfabric

    (@znqfabric)


    In my store, I need items to drop back in stock once the time expires, so that other people can purchase them. It seems (from reading other threads) that if a customer abandons their cart, the items will “expire” but will not drop back into stock until they revisit their cart and get the expiration notification. This is causing some issues for me with what I call “ghost carts” where the customer has left but the item has not become available. (I often have other customers watching the countdown ready to purchase expired items.) I am looking for a solution – either making items expire regardless of abandonment, or even if there were just a button I could click to “restock all expired items” or something?

    • This topic was modified 7 years, 5 months ago by znqfabric.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author James Golovich

    (@jamesgol)

    There is a setting in the WooCommerce Cart Stock Reducer settings to expire items from the cart. If the expiration is enabled the items will be expired regardless of if the cart is abandoned or not, once the expiration time has passed the item is no longer considered part of the virtual stock.

    Thread Starter znqfabric

    (@znqfabric)

    Hmm interesting, I believe I have that setting enabled but I am having a discrepancy with how much is shown in stock as if items are not expiring. Let me double check and get details.

    Do you know if I disable the plugin and then enable it again later, if that would cause any issues with items getting “stuck”? I only use the plugin when stocking limited inventory and I usually disable it between stockings.

    Thread Starter znqfabric

    (@znqfabric)

    This is the comment you wrote on another thread that confused me as to when the items go back in stock.

    That gets a bit tricky, since the items don’t technically leave the cart until that user visits the site again and then the “Items have been removed from cart” notice is displayed. At that point the ‘wc_csr_before_remove_expire_item’ action is called but I’m not sure if it is going to be useful in your case since that action will only be fired when that user comes back (if they do).

    • This reply was modified 7 years, 5 months ago by znqfabric.
    Plugin Author James Golovich

    (@jamesgol)

    Items that are added to carts when this plugin isn’t running (or not set managed) will never be expired by this plugin.

    The previous person asking that was trying to run a function/action when an item was expired.

    Thread Starter znqfabric

    (@znqfabric)

    What about an item that is added when the plugin is running, but the plugin is switched off before it expires, and then days later the plugin is switched back on? Do you know what would happen in that case? (I don’t know if I have done this, but could it cause a problem?)

    (Also, this plugin overall is amazing and it’s surprisingly SO hard to find plugins with this functionality so I really appreciate your work!!)

    • This reply was modified 7 years, 5 months ago by znqfabric.
    Plugin Author James Golovich

    (@jamesgol)

    The way the expiration works is when an item is added to a cart, the expiration time is set based on the configured value (IE: if it’s 10 minutes the current time in seconds plus 10 minutes). When the plugin checks the carts for virtual quantity if the item is past this expiration time, that cart entry is ignored.

    In my opinion, it doesn’t make any sense to be enabling/disabling the plugin. If you are going to use it just leave it on all the time.

    I always recommend people purge the WooCommerce sessions/carts when enabling the plugin because any items that were added before won’t be considered for expiration.

    Thread Starter znqfabric

    (@znqfabric)

    I end up disabling the plugin because when I stock new things I have a lot of customers vying for products that only have a few units in stock, but MOST of the time I have only a few customers who are buying items with plenty in stock (so not competing for the same items.)

    So I need the items to expire quickly during the stocking rush (so other customers waiting can buy them), but outside of those times, when customers are buying things with plenty of units in stock they get annoyed if things keep expiring from their cart.

    I suppose I can just set the time longer during slow times.

    Thread Starter znqfabric

    (@znqfabric)

    I think going forward I am going to keep the plugin enabled and quit switching it on and off, and I will monitor for any inventory issues (I am not able to duplicate the “ghost cart” behavior I was having previously). I’ll mark this resolved and I really appreciate your explanations!

    Plugin Author James Golovich

    (@jamesgol)

    There are some filters available to adjust the behavior of the plugin, including adjusting the expiration time. There isn’t a lot of documentation available since there really aren’t that many people using that functionality.

    One thing you can do is add a custom field to items you don’t care about expiration with a name of ‘csr_expire_time’ and set the value to ‘never’ and those items won’t ever expire.

    I thought I had a filter available to dynamically set the time, but I didn’t see anything quickly looking. I’ll see about adding one.

    Really though it depends on what your use case is. You can set all items to never expire and then set a custom expiration on special items or you set all items to expire except for certain ones.

    Same here, the item expire but it continues with the information that the item is on someones cart, and when i try – manualy – to put the item ot stock again, it wont work. I change the stats to “In Stock” and save, but it comes back to “Out of Stock”.

    Plugin Author James Golovich

    (@jamesgol)

    @rangelrmorais If you are newly using the plugin the most likely scenario is use have existing sessions/carts that had items added before activating the plugin. Clearing the sessions via WooCommerce generally solves this issue.

    Hi @jamesgol, in fact, this plugin was activated some days ago. Im using a plugin to clear the abandoned cards, but in fact, this “need” for the user back to the store to trigger the function that clear his cart, is complicating things around here. Is there a way to clear the user cart as soon he exits the page?

    Im not an expert, but i’d love to contribuite with this in some way.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Abandoned items not going back in stock’ is closed to new replies.