What it does
- When a shopper adds a low-stock product to the cart, those pieces are held for a number of minutes (5 to 120, you choose). Other shoppers cannot take them.
- The cart page shows a box with a live countdown: "Your items are held for you for 14:32".
- If another shopper asks for more than is free, they are sent to the product page with the message "Only 2 left right now, the rest is held in other carts for a few minutes."
- When the time is up the hold is released: the item leaves the cart the next time the cart is opened, with a message that says which product it was, and the pieces are on sale again at once.
- The timer starts when the product enters the cart and is not extended by changing the quantity.
- You choose which products take part: only products with at most N pieces in stock (default 5), or every product that counts its stock (0).
- The admin page lists what is held right now (product, stock, held pieces, number of carts, soonest end) and has a button to release every hold.
- A shopper who buys no longer holds anything.
- Texts on the cart and product page can be translated by copying the language file.
Works with
OpenCart 2.3, 3.0, 4.0 and 4.1 (one zip for each).
Good to know
Screenshots are still to be added.
- Only products whose stock is counted (the "subtract stock" option) take part, and nothing is held if your shop sells out-of-stock items anyway.
- A hold belongs to the shopper's browser session. A shopper who signs in on another device does not carry the hold with them.
- A shopper who adds an item and never comes back keeps the pieces held until the time is up, and then they are free for everyone; the item stays in that cart until the shopper opens it again.
- If a payment is confirmed by the payment service while the shopper is away from the shop, the hold of that purchase stays until its time is up (at most the number of minutes you chose).
- Holds are only kept for minutes, so the module's table is removed when you uninstall it.
- Tested on the four versions with the real admin installer and two shoppers at once (hold, block, expiry, release, switch off). The countdown and the release were used in a real browser on 3.0 and 4.1. The step that drops a buyer's holds after an order was not run with a real order.