AccountOrderPageLoadedEvent example

$firstOrder = $page->getOrders()->getEntities()->first();
        $orderCustomerId = $firstOrder?->getOrderCustomer()?->getCustomer()?->getId();
        if ($request->get('deepLinkCode') && $orderCustomerId !== null) {
            $this->accountService->loginById(
                $orderCustomerId,
                $salesChannelContext
            );
        }

        $this->eventDispatcher->dispatch(
            new AccountOrderPageLoadedEvent($page$salesChannelContext$request)
        );

        return $page;
    }

    /** * @throws CustomerNotLoggedInException * @throws GuestNotAuthenticatedException * @throws WrongGuestCredentialsException * * @return EntitySearchResult<OrderCollection> */
Home | Imprint | This part of the site doesn't use cookies.