setSeoCategory example

$criteria->setIds([$productId]);
            $criteria->setTitle('product-detail-route');

            $product = $this->productRepository
                ->search($criteria$context)
                ->first();

            if (!($product instanceof SalesChannelProductEntity)) {
                throw new ProductNotFoundException($productId);
            }

            $product->setSeoCategory(
                $this->breadcrumbBuilder->getProductSeoCategory($product$context)
            );

            $configurator = $this->configuratorLoader->load($product$context);

            $pageId = $product->getCmsPageId();

            if ($pageId) {
                // clone product to prevent recursion encoding (see NEXT-17603)                 $resolverContext = new EntityResolverContext($context$request$this->productDefinition, clone $product);

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