public function setCartAsOrdered(OrderOnCreatedEvent $event)
    {
        $cart = $event
            ->getCart()
            ->setOrdered(true);

        $this->cartObjectManager->flush($cart);
    }
public function setCartAsOrdered(OrderOnCreatedEvent $event)
    {
        $cart = $event
            ->getCart()
            ->setOrdered(true);

        $this->cartObjectManager->flush($cart);
    }
public function setCartAsOrdered ( OrderOnCreatedEvent $ event ) { $ cart = $ event -> getCart ( ) -> setOrdered ( true ) ; $ this -> cartObjectManager -> flush ( $ cart ) ; }
After an Order is created, the cart is set as Ordered enabling related
flag.

@param OrderOnCreatedEvent $event Event
After an Order is created the cart is set as Ordered enabling related flag .