Triggered before an existing order record is saved to the database.
Event handler example:
public function subscribeEvents()
{
Backend::$events->addEvent('shop:onOrderBeforeUpdate', $this, 'process_order_update');
}
public function process_order_update($order, $session_key)
{
// Perform some check
if ($order->total > 10000)
throw new Phpr_ApplicationException('Order total should not exceed $10,000');
$items = $order->list_related_records_deferred('items', $session_key);
}