OrderConvertedEvent example

/* NEXT-708 support: - transactions */

        $lineItems = LineItemTransformer::transformFlatToNested($order->getLineItems());

        $cart->addLineItems($lineItems);
        $cart->setDeliveries(
            $this->convertDeliveries($order->getDeliveries()$lineItems)
        );

        $event = new OrderConvertedEvent($order$cart$context);
        $this->eventDispatcher->dispatch($event);

        return $event->getConvertedCart();
    }

    /** * @param array<string, array<string, bool>|string> $overrideOptions * * @throws InconsistentCriteriaIdsException */
    public function assembleSalesChannelContext(OrderEntity $order, Context $context, array $overrideOptions = []): SalesChannelContext
    {
Home | Imprint | This part of the site doesn't use cookies.