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

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

Event handler signature

public void event_onExtendCustomerPreviewToolbar(Backend_Controller $controller, Shop_Customer $customer)
$controller Backend_Controller specifies the controller object. Use this object to render custom partials.
$customer Shop_Customer specifies the customer object.
Allows to add new buttons to the toolbar on the Customer Preview page in the Administration Area. The event handler accepts two parameters - the controller object, which you can use for rendering a partial containing new buttons, and a customer object.
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onExtendCustomerPreviewToolbar', $this, 'extend_customer_toolbar');
}

public function extend_customer_toolbar($controller, $customer)
{
  $controller->renderPartial(PATH_APP.'/modules/subscriptions/partials/_customer_toolbar.htm',
    array(
      'customer'=>$customer
    ));
}

// Example of the _customer_toolbar.htm partial

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