$response =
$this->
renderStorefront('@Storefront/storefront/page/wishlist/index.html.twig',
['page' =>
$page]);
$response->headers->
set('x-robots-tag', 'noindex'
);
return $response;
} #[Route(path: '/wishlist/list', name: 'frontend.wishlist.product.list', options: ['seo' => false], defaults: ['XmlHttpRequest' => true, '_loginRequired' => true], methods: ['GET'])]
public function ajaxList(Request
$request, SalesChannelContext
$context, CustomerEntity
$customer): Response
{ $criteria =
new Criteria();
$this->eventDispatcher->
dispatch(new WishListPageProductCriteriaEvent($criteria,
$context,
$request));
try { $res =
$this->wishlistLoadRoute->
load($request,
$context,
$criteria,
$customer);
} catch (CustomerWishlistNotFoundException
) { return new JsonResponse([]);
} return new JsonResponse($res->
getProductListing()->
getIds());
} #[Route(path: '/wishlist/product/delete/{id}', name: 'frontend.wishlist.product.delete', defaults: ['XmlHttpRequest' => true, '_loginRequired' => true], methods: ['POST', 'DELETE'])]