public function orderCartClear(/** @noinspection PhpUnusedParameterInspection */ OrderEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        // Empty cart and clear current order
        $session = $this->getSession();

        $session->clearSessionCart($dispatcher);

        $session->setOrder(new OrderModel());
    }
public function orderCartClear(/** @noinspection PhpUnusedParameterInspection */ OrderEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        // Empty cart and clear current order
        $session = $this->getSession();

        $session->clearSessionCart($dispatcher);

        $session->setOrder(new OrderModel());
    }
public function orderCartClear ( /** @noinspection PhpUnusedParameterInspection */ OrderEvent $ event , $ eventName , EventDispatcherInterface $ dispatcher ) { // Empty cart and clear current order $ session = $ this -> getSession ( ) ; $ session -> clearSessionCart ( $ dispatcher ) ; $ session -> setOrder ( new OrderModel ( ) ) ; }
Clear the cart and the order in the customer session once the order is placed,
and the payment performed.

@param OrderEvent $event
@param $eventName
@param EventDispatcherInterface $dispatcher
Clear the cart and the order in the customer session once the order is placed and the payment performed .