This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

shop:onProductOutOfStock event

Triggered by Shop_Product
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onProductOutOfStock(Shop_Product $product, Shop_OptionMatrixRecord $om_record)
$product Shop_Product specifies the product object.
$om_record Shop_OptionMatrixRecord specifies the Option Matrix record, if applicable.
Triggered when a product stock reaches the out of stock threshold (goes out of stock). Example:
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onProductOutOfStock', $this, 'process_out_of_stock');
}

public function process_out_of_stock($product, $om_record)
{
  // Do something 
  //
}