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

Triggered by Shop_OrderStatus
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onExtendOrderStatusModel(Shop_OrderStatus $status, string $context)
$status Shop_OrderStatus specifies the order status object.
$context string specifies the execution context.
Allows to define new columns in the order status model. The event handler should accept two parameters - the order status object and the form execution context string. To add new columns to the order status model, call the define_column() method of the status object. Before you add new columns to the model, you should add them to the database (the shop_order_statuses table).
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onExtendOrderStatusModel', $this, 'extend_order_status_model');
  Backend::$events->addEvent('shop:onExtendOrderStatusForm', $this, 'extend_order_status_form');
}

public function extend_order_status_model($status, $context)
{
  $status->define_column('x_custom_column', 'Custom column')->invisible();
}

public function extend_order_status_form($status, $context)
{
  $status->add_form_field('x_custom_column')->tab('Order Status');
}