setOrders example


        if (!$salesChannelContext->getCustomer() && $request->get('deepLinkCode', false) === false) {
            throw CartException::customerNotLoggedIn();
        }

        $page = $this->genericLoader->load($request$salesChannelContext);

        $page = AccountOrderPage::createFrom($page);

        $page->getMetaInformation()?->setRobots('noindex,follow');

        $page->setOrders(StorefrontSearchResult::createFrom($this->getOrders($request$salesChannelContext)));

        $page->setDeepLinkCode($request->get('deepLinkCode'));

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

        
Home | Imprint | This part of the site doesn't use cookies.