setNewestOrder example


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

        $page = AccountOverviewPage::createFrom($page);
        $page->setCustomer($this->loadCustomer($salesChannelContext$customer));

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

        $order = $this->loadNewestOrder($salesChannelContext$request);

        if ($order !== null) {
            $page->setNewestOrder($order);
        }

        $newslAccountPagelet = $this->newsletterAccountPageletLoader->load($request$salesChannelContext$customer);

        $page->setNewsletterAccountPagelet($newslAccountPagelet);

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

        return $page;
    }
Home | Imprint | This part of the site doesn't use cookies.