createSalesChannelDomain example



        $shopConfigurator = new ShopConfigurator($connection);
        $shopConfigurator->updateBasicInformation($shop['name']$shop['email']);
        $shopConfigurator->setDefaultLanguage($shop['locale']);
        $shopConfigurator->setDefaultCurrency($shop['currency']);

        $this->deleteAllSalesChannelCurrencies($connection);

        $newSalesChannelId = Uuid::randomBytes();
        $this->createSalesChannel($newSalesChannelId$shop$connection);
        $this->createSalesChannelDomain($newSalesChannelId$shop$connection);
    }

    /** * @param Shop $shop */
    private function createSalesChannel(string $newId, array $shop, Connection $connection): void
    {
        $typeId = Defaults::SALES_CHANNEL_TYPE_STOREFRONT;

        $paymentMethod = $this->getFirstActivePaymentMethodId($connection);
        $shippingMethod = $this->getFirstActiveShippingMethodId($connection);

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