#[Route(path: '/widgets/checkout/info', name: 'frontend.checkout.info', defaults: ['XmlHttpRequest' => true], methods: ['GET'])]
public function info(Request
$request, SalesChannelContext
$context): Response
{ $cart =
$this->cartService->
getCart($context->
getToken(),
$context);
if ($cart->
getLineItems()->
count() <= 0
) { return new Response(null, Response::HTTP_NO_CONTENT
);
} $page =
$this->offcanvasCartPageLoader->
load($request,
$context);
$this->
hook(new CheckoutInfoWidgetLoadedHook($page,
$context));
$response =
$this->
renderStorefront('@Storefront/storefront/layout/header/actions/cart-widget.html.twig',
['page' =>
$page]);
$response->headers->
set('x-robots-tag', 'noindex'
);
return $response;
} #[Route(path: '/checkout/offcanvas', name: 'frontend.cart.offcanvas', options: ['seo' => false], defaults: ['XmlHttpRequest' => true], methods: ['GET'])]
public function offcanvas(Request
$request, SalesChannelContext
$context): Response
{ $page =
$this->offcanvasCartPageLoader->
load($request,
$context);