sGetCustomergroup example


        if (empty($this->sSettings['customergroupID'])) {
            $this->sSettings['customergroupID'] = (int) $shop->getCustomerGroup()->getId();
        } else {
            $this->sSettings['customergroupID'] = (int) $this->sSettings['customergroupID'];
        }
        if (empty($this->sSettings['currencyID'])) {
            $this->sSettings['currencyID'] = $this->shopData['currency_id'];
        }

        $this->sCurrency = $this->sGetCurrency($this->sSettings['currencyID']);
        $this->sCustomergroup = $this->sGetCustomergroup($this->sSettings['customergroupID']);

        $this->articleMediaAlbum = $this->getMediaRepository()
            ->getAlbumWithSettingsQuery(-1)
            ->getOneOrNullResult(AbstractQuery::HYDRATE_OBJECT);

        if ($this->sCurrency === false) {
            throw new RuntimeException('Currency could not be fetched correctly.');
        }
        $currency = Shopware()->Models()->getRepository(Currency::class)->find($this->sCurrency['id']);
        $shop->setCurrency($currency);
        Shopware()->Container()->get(ShopRegistrationServiceInterface::class)->registerShop($shop);

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