LemonStand Documentation

shop:onExtendOrdersToolbar event

The shop:onExtendOrdersToolbar event allows to add new buttons to the toolbar above the order list in the Administration Area.  The event handler should accept a single parameter - the controller object, which you can use for rendering a partial containing new buttons. Event handler example:

public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onExtendOrdersToolbar', $this, 'extend_orders_toolbar');
}
 
public function extend_orders_toolbar($controller)
{
  $controller->renderPartial(PATH_APP.'/modules/mymodule/partials/_orders_toolbar.htm');
}

// Example of the _orders_toolbar.htm partial

<div class="separator">&nbsp;</div>
<?= backend_ctr_button('My button', 'my_button_css_class', url('mymodule/manage/')) ?>

Next: core:onProcessImage event
Previous: cms:onExtendTemplateForm event
Return to Handling LemonStand events