public function onAdd(OrderItemEvent $event)
    {
        $order = $event->getOrder();
        $item  = $event->getItem();

        $order->addItem($item);
    }
public function onAdd(OrderItemEvent $event)
    {
        $order = $event->getOrder();
        $item  = $event->getItem();

        $order->addItem($item);
    }
public function onAdd ( OrderItemEvent $ event ) { $ order = $ event -> getOrder ( ) ; $ item = $ event -> getItem ( ) ; $ order -> addItem ( $ item ) ; }
Item add event handler.

@param OrderItemEvent $event
Item add event handler .