setCrossSellings example

return;
        }

        $request->request->set('parentId', $product->getParentId());
        $reviews = $this->productReviewLoader->load($request$context);
        $reviews->setParentId($product->getParentId() ?? $product->getId());

        $page->setReviews($reviews);

        $crossSellings = $this->crossSellingRoute->load($product->getId()new Request()$contextnew Criteria());

        $page->setCrossSellings($crossSellings->getResult());
    }
}
if ($productConfig->isStatic()) {
            $product = $this->getSlotProduct($slot$result$productConfig->getStringValue());
        }

        if ($product === null) {
            return;
        }

        $crossSellings = $this->crossSellingLoader->load($product->getId()new Request()$contextnew Criteria())->getResult();

        if ($crossSellings->count()) {
            $struct->setCrossSellings($crossSellings);
        }
    }
}
Home | Imprint | This part of the site doesn't use cookies.