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

Triggered by /modules/shop/controllers/shop_orders/preview.htm
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onExtendOrderPreviewToolbar(Shop_Orders $controller, Shop_Order $order)
$controller Shop_Orders specifies the controller object.
$order Shop_Order specifies the order object.
Allows to add new buttons to the toolbar above the Order Preview form. The event handler accepts two parameter - the controller object, which you can use for rendering a partial containing new buttons and the order object.
The following example adds the "Subscription chart" button to the order preview toolbar. Similar code used in the Subscriptions Module.
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onExtendOrderPreviewToolbar', $this, 'extend_order_toolbar');
}

public function extend_order_toolbar($controller, $order)
{
  $controller->renderPartial(PATH_APP.'/modules/subscriptions/partials/_order_toolbar.htm',
    array('order'=>$order));
}

// Example of the _order_toolbar.htm partial

<? if (Subscriptions_Engine::get()->order_has_subscriptions($order->id)): ?>
  <div class="separator">&nbsp;</div>
  <?= backend_ctr_button('Subscription chart', 'subscription_chart', url('subscriptions/chart/order/'.$order->id)) ?>
<? endif ?>