getProductsMedia example


        }

        return $this->variantCoverService->getList($products$context);
    }

    /** * {@inheritdoc} */
    public function getProductMedia(BaseProduct $product, ShopContextInterface $context)
    {
        $media = $this->getProductsMedia([$product]$context);

        return array_shift($media);
    }

    /** * {@inheritdoc} */
    public function getProductsMedia($products, ShopContextInterface $context)
    {
        $specifyMedia = $this->variantMediaGateway->getList($products$context);

        
$relatedProducts = $this->relatedProductsService->getList($listProducts$context);

        $relatedProductStreams = $this->relatedProductStreamsService->getList($listProducts$context);

        $similarProducts = $this->similarProductsService->getList($listProducts$context);

        $downloads = $this->downloadService->getList($listProducts$context);

        $links = $this->linkService->getList($listProducts$context);

        $media = $this->mediaService->getProductsMedia($listProducts$context);

        $properties = $this->propertyService->getList($listProducts$context);

        $configuration = $this->configuratorService->getProductsConfigurations($listProducts$context);

        $products = [];
        foreach ($listProducts as $number => $listProduct) {
            $product = Product::createFromListProduct($listProduct);

            if (isset($relatedProducts[$number])) {
                $product->setRelatedProducts($relatedProducts[$number]);
            }
Home | Imprint | This part of the site doesn't use cookies.