getTaxPrices example


            [':articleId' => $variant['articleId']]
        );

        if (empty($tax)) {
            throw new CustomValidationException(sprintf('No product tax configured for variant: %s', $variant['id']));
        }

        $variant['prices'] = $this->getArticleResource()->getTaxPrices(
            $variant['prices'],
            (float) $tax
        );

        return $variant;
    }

    /** * @param Collection<int, Image> $availableImages */
    private function getAvailableMediaImage(Collection $availableImages, int $mediaId): ?Image
    {
$product['images'] = $this->getArticleImages($id);
            $product['configuratorSet'] = $this->getArticleConfiguratorSet($id);
            $product['links'] = $this->getArticleLinks($id);
            $product['downloads'] = $this->getArticleDownloads($id);
            $product['categories'] = $this->getArticleCategories($id);
            $product['similar'] = $this->getArticleSimilar($id);
            $product['related'] = $this->getArticleRelated($id);
            $product['details'] = $this->getArticleVariants($id);
            $product['seoCategories'] = $this->getArticleSeoCategories($id);

            if (isset($options['considerTaxInput']) && $options['considerTaxInput']) {
                $product['mainDetail']['prices'] = $this->getTaxPrices(
                    $product['mainDetail']['prices'],
                    $product['tax']['tax']
                );

                foreach ($product['details'] as &$detail) {
                    $detail['prices'] = $this->getTaxPrices(
                        $detail['prices'],
                        $product['tax']['tax']
                    );
                }
                unset($detail);
            }
Home | Imprint | This part of the site doesn't use cookies.