$page =
$this->productPageLoader->
load($request,
$context);
$this->
hook(new ProductPageLoadedHook($page,
$context));
$ratingSuccess =
$request->
get('success'
);
/**
* @deprecated tag:v6.6.0 - remove complete if statement, cms page id is always set
*
* Fallback layout for non-assigned product layout
*/
if (!
$page->
getCmsPage()) { Feature::
throwException('v6.6.0.0', 'Fallback will be removed because cms page is always set in subscriber.'
);
return $this->
renderStorefront('@Storefront/storefront/page/product-detail/index.html.twig',
['page' =>
$page, 'ratingSuccess' =>
$ratingSuccess]);
} return $this->
renderStorefront('@Storefront/storefront/page/content/product-detail.html.twig',
['page' =>
$page]);
} #[Route(path: '/detail/{productId}/switch', name: 'frontend.detail.switch', defaults: ['XmlHttpRequest' => true, '_httpCache' => true], methods: ['GET'])]
public function switch(string
$productId, Request
$request, SalesChannelContext
$salesChannelContext): JsonResponse
{