sCreateRewriteTableForSingleCampaign example

->andWhere('emotions.parentId IS NULL')
            ->andWhere('emotions.active = 1');

        if ($limit !== null && $offset !== null) {
            $queryBuilder->setFirstResult($offset)->setMaxResults($limit);
        }

        $campaigns = $queryBuilder->getQuery()->getArrayResult();
        $routerCampaignTemplate = $this->config->get('routerCampaignTemplate');

        foreach ($campaigns as $campaign) {
            $this->sCreateRewriteTableForSingleCampaign(
                $this->translationComponent,
                $languageId,
                $fallbackId,
                $campaign,
                $routerCampaignTemplate
            );
        }
    }

    /** * @param int $shopId * @param int $fallbackShopId * @param string $routerCampaignTemplate * * @throws Exception * @throws SmartyException */
$routerCampaignTemplate = Shopware()->Config()->get('routerCampaignTemplate');

        foreach ($shops as $shop) {
            $seoIndexer->registerShop($shop->getId());
            $fallbackShopId = null;
            $fallbackShop = $shop->getFallback();
            if (!empty($fallbackShop)) {
                $fallbackShopId = $fallbackShop->getId();
            }
            // Make sure a template is available             $module->baseSetup();
            $module->sCreateRewriteTableForSingleCampaign($translator$shop->getId()$fallbackShopId$emotionData$routerCampaignTemplate);
        }
    }

    private function getSeoUrlFromRouter(int $emotionId, int $shopId): ?string
    {
        $repository = Shopware()->Container()->get(ModelManager::class)->getRepository(Shop::class);
        $shop = $repository->getActiveById($shopId);
        if (empty($shop)) {
            return null;
        }
        $parent = $shop;
        
Home | Imprint | This part of the site doesn't use cookies.