You're viewing the documentation of an older Simple Commerce version. Consider upgrading to the latest for new features and bug fixes.


  1. # Events

To start using the stock functionality built into Simple Commerce, you'll need to add an Integer field, with the handle of stock to your product blueprint.

After that, you can populate your products with the correct amount of stock. Then, whenever a customer purhcases something on your store, the quantity of each product will be subtracted from the product's stock.


Simple Commerce will fire events when either your stock is running low or if your stock has ran out for one of your products.

You can configure the threshold for when you want to start dispatching the StockRunningLow event in your simple-commerce.php config.

2 |--------------------------------------------------------------------------
3 | Stock Running Low
4 |--------------------------------------------------------------------------
5 |
6 | Simple Commerce can be configured to emit events when stock is running low for
7 | products. Here is where you can configure the threshold when we start sending
8 | those notifications.
9 |
12'low_stock_threshold' => 25,
Last updated 2 months ago Improve this page on GitHub!