ProductPageLoadedHook example

private readonly SeoUrlPlaceholderHandlerInterface $seoUrlPlaceholderHandler,
        private readonly ProductReviewLoader $productReviewLoader,
        private readonly SystemConfigService $systemConfigService
    ) {
    }

    #[Route(path: '/detail/{productId}', name: 'frontend.detail.page', defaults: ['_httpCache' => true], methods: ['GET'])]     public function index(SalesChannelContext $context, Request $request): Response
    {
        $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.');

            
Home | Imprint | This part of the site doesn't use cookies.