getAreaId example

'countryname' => $country->getName(),
            'countryiso' => $country->getIso(),
            'countryen' => $country->getEn(),
            'position' => $country->getPosition(),
            'taxfree' => $country->isTaxFree(),
            'taxfree_ustid' => $country->isTaxFreeForVatId(),
            'taxfree_ustid_checked' => $country->checkVatId(),
            'active' => $country->isActive(),
            'iso3' => $country->getIso3(),
            'display_state_in_registration' => $country->displayStateSelection(),
            'force_state_in_registration' => $country->requiresStateSelection(),
            'areaID' => $country->getAreaId(),
            'allow_shipping' => $country->allowShipping(),
            'states' => [],
            'attributes' => $country->getAttributes(),
        ]);

        if ($country->displayStateSelection()) {
            $data['states'] = $this->convertStateStructList($country->getStates());
            $data['states'] = array_map(function D$state) use ($country) {
                $state['countryID'] = $country->getId();

                return $state;
            },
 else {
            if (method_exists($this->countryGateway, 'getFallbackCountry')) {
                $country = $this->countryGateway->getFallbackCountry($context);
            }
        }

        $state = null;
        if ($stateId !== null) {
            $state = $this->countryGateway->getState($stateId$context);
        }

        if (!$area && $country instanceof Country && \is_int($country->getAreaId())) {
            $area = $this->countryGateway->getArea($country->getAreaId()$context);
        }

        $taxRules = $this->taxGateway->getRules($currentCustomerGroup$area$country$state);

        $priceGroups = $this->priceGroupDiscountGateway->getPriceGroups($currentCustomerGroup$context);

        return new ShopContext(
            $baseUrl,
            $shop,
            $currency,
            
Home | Imprint | This part of the site doesn't use cookies.