Commerce Stock Reserve

Component ID

2233615

Component name

Commerce Stock Reserve

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

4608

Component created

Component changed

Component body

This module extends Commerce Stock to allow "reserving" a product's stock when a customer adds it to their shopping cart. This removes the risk of overselling when multiple customers are attempting to buy the same product at the same time.

The trade-off is that there is a risk of underselling, if stock remains reserved in customers' carts when sales are closed. So this module lets you release old reserved stock during cron runs. The default is that reserved stock will be released from carts that have not been modified for more than half an hour. You can configure this behaviour at admin/commerce/config/stock/reserve. You can also use this module alongside Commerce Cart Expiration , which deletes entire carts after a configured period of inactivity.

Warning: scope of this module

This module only deals with reserving stock. It does not check or validate stock levels, and it does not decrement stock levels on purchase.

For the simplest solution, use this module alongside Commerce Simple Stock and Commerce Simple Stock Rules (commerce_ss and commerce_ssr, both submodules of Commerce Stock), and leave all the default rules enabled.

Credits

Developed by Patrick Dawkins at UCLU, the students' union for University College London.