prepareVariantData example

$originals = $generatorData['originals'];
        $variants = Shopware()->Db()->fetchAll($sql);

        $counter = 1;
        if ($mergeType === 1) {
            $counter = $offset;
        }
        $allOptions = $this->getRepository()->getAllConfiguratorOptionsIndexedByIdQuery()->getResult();

        // Iterate all selected variants to insert them into the database         foreach ($variants as $variant) {
            $variantData = $this->prepareVariantData($variant$detailData$counter$dependencies$priceVariations$allOptions$originals$product$mergeType);
            if ($variantData === false) {
                continue;
            }

            // Merge the data with the original main detail data             $data = array_merge($detailData$variantData);

            $existentDetailModel = $offset === 0 && $mergeType === 1;

            $data = $this->container->get('events')->filter(
                'Shopware_Controllers_Article_CreateConfiguratorVariants_FilterData',
                
Home | Imprint | This part of the site doesn't use cookies.