protected function getAddressZoneId(array $address)
    {
        $result = array();

        foreach (array('state_id', 'city_id', 'country') as $field) {

            if (empty($address[$field])) {
                continue;
            }

            if ($field === 'city_id') {
                $data = $this->city->get($address[$field]);
            } else if ($field === 'state_id') {
                $data = $this->state->get($address[$field]);
            } else if ($field === 'country') {
                $data = $this->country->get($address[$field]);
            }

            if (!empty($data['zone_id'])) {
                $result[] = $data['zone_id'];
            }
        }

        return $result;
    }
protected function getAddressZoneId(array $address)
    {
        $result = array();

        foreach (array('state_id', 'city_id', 'country') as $field) {

            if (empty($address[$field])) {
                continue;
            }

            if ($field === 'city_id') {
                $data = $this->city->get($address[$field]);
            } else if ($field === 'state_id') {
                $data = $this->state->get($address[$field]);
            } else if ($field === 'country') {
                $data = $this->country->get($address[$field]);
            }

            if (!empty($data['zone_id'])) {
                $result[] = $data['zone_id'];
            }
        }

        return $result;
    }
protected function getAddressZoneId ( array $ address ) { $ result = array ( ) ; foreach ( array ( 'state_id' , 'city_id' , 'country' ) as $ field ) { if ( empty ( $ address [ $ field ] ) ) { continue ; } if ( $ field === 'city_id' ) { $ data = $ this -> city -> get ( $ address [ $ field ] ) ; } else if ( $ field === 'state_id' ) { $ data = $ this -> state -> get ( $ address [ $ field ] ) ; } else if ( $ field === 'country' ) { $ data = $ this -> country -> get ( $ address [ $ field ] ) ; } if ( ! empty ( $ data [ 'zone_id' ] ) ) { $ result [ ] = $ data [ 'zone_id' ] ; } } return $ result ; }
Returns an array of zone IDs from address components
@param array $address
@return array
Returns an array of zone IDs from address components