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'])]
public function remove(string
$id, Request
$request, SalesChannelContext
$context, CustomerEntity
$customer): Response
{ if (!
$id) { throw RoutingException::
missingRequestParameter('id'
);
} try { $this->removeWishlistProductRoute->
delete($id,
$context,
$customer);