preparePriceAssociation example


    protected function prepareData(array $data, ProductModel $article, Detail $variant)
    {
        $data = $this->prepareUnitAssociation($data);

        if (!empty($data['prices'])) {
            $data['prices'] = $this->preparePriceAssociation(
                $data,
                $article,
                $variant,
                $article->getTax()
            );
        }

        if (isset($data['purchasePrice']) && \is_string($data['purchasePrice'])) {
            $data['purchasePrice'] = (float) str_replace(',', '.', $data['purchasePrice']);
        }

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