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:onNewOrder event

Triggered by Shop_Order
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onNewOrder(integer $order_id)
$order_id integer specifies the order identifier.
Triggered after a new order is placed. Inside the event handler you can perform further order processing. Event handler example:
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onNewOrder', $this, 'process_new_order');
}

public function process_new_order($order_id)
{
  $order = Shop_Order::create()->find($order_id);
  foreach ($order->items as $item)
  {
    // Do something with order items
  }
}