$customer =
$context->
getCustomer();
if ($customer !== null &&
$customer->
getGuest() === false
) { throw new NotFoundHttpException();
} $pagelet =
$this->guestPageletLoader->
load($request,
$context);
$this->
hook(new GuestWishlistPageletLoadedHook($pagelet,
$context));
return $this->
renderStorefront( '@Storefront/storefront/page/wishlist/wishlist-pagelet.html.twig',
['page' =>
$pagelet, 'searchResult' =>
$pagelet->
getSearchResult()->
getObject()] );
} #[Route(path: '/widgets/wishlist', name: 'widgets.wishlist.pagelet', options: ['seo' => false], defaults: ['XmlHttpRequest' => true, '_loginRequired' => true], methods: ['GET', 'POST'])]
public function ajaxPagination(Request
$request, SalesChannelContext
$context, CustomerEntity
$customer): Response
{ $request->request->
set('no-aggregations', true
);
$page =
$this->wishlistPageLoader->
load($request,
$context,
$customer);
$this->
hook(new WishlistPageLoadedHook($page,
$context));