duplicateArticleCategories example

$product = $this->get('models')->find(Product::class$productId);
        if ($product->getConfiguratorSet() !== null) {
            $isConfigurator = true;
            $mailDetailId = $product->getMainDetail()->getId();
        } else {
            $isConfigurator = false;
            $mailDetailId = null;
        }

        $this->duplicateArticleData($productId);
        $newProductId = (int) Shopware()->Db()->lastInsertId('s_articles');
        $this->duplicateArticleCategories($productId$newProductId);
        $this->duplicateArticleCustomerGroups($productId$newProductId);
        $this->duplicateArticleRelated($productId$newProductId);
        $this->duplicateArticleSimilar($productId$newProductId);
        $this->duplicateArticleTranslations($productId$newProductId);
        $this->duplicateArticleDetails($productId$newProductId$mailDetailId);
        $this->duplicateArticleLinks($productId$newProductId);
        $this->duplicateArticleImages($productId$newProductId);
        $this->duplicateArticleProperties($productId$newProductId);
        $this->duplicateArticleDownloads($productId$newProductId);
        $setId = $this->duplicateArticleConfigurator($productId);

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