Allows to display custom information about an order item in the Administration Area, for example on the Order Preview page.
Below is an event handler example. Similar code used in the
Subscriptions Module:
public function subscribeEvents()
{
Backend::$events->addEvent('shop:onGetOrderItemDisplayDetails', $this, 'get_order_item_details');
}
public function get_order_item_details($item, $as_plain_text)
{
if ($item->x_subscription_start_date && $item->x_subscription_end_date)
return 'Subscription: '.
$item->x_subscription_start_date->format('%x').' - '.$item->x_subscription_end_date->format('%x');
return 'Subscription start date is undefined until the order is paid.';
}