copyConfigurationTemplateTranslations example

            if ($existentDetailModel) {
                $detail = $product->getMainDetail();
            } else {
                $detail = new ProductVariant();
                $this->get('models')->persist($detail);
            }

            $detail->fromArray($data);
            $detail->setArticle($product);
            $this->get('models')->flush();

            $this->copyConfigurationTemplateTranslations($detailData$detail);
            ++$offset;
        }

        $this->get('models')->clear();

        $product = $this->getRepository()->find($productId);
        if (!$product instanceof Product) {
            throw new ModelNotFoundException(Product::class$productId);
        }

        // Check if the main detail variant was deleted
Home | Imprint | This part of the site doesn't use cookies.