protected function checkZoneIdByAddressId($condition, $data, $key)
    {
        $address = $this->address->get($data['data']['order'][$key]);

        if (empty($address)) {
            return false;
        }

        $fields = array('country_zone_id', 'state_zone_id', 'city_zone_id');

        $ids = array();

        foreach ($fields as $field) {
            $ids[] = $address[$field];
        }

        return $this->compare($ids, $condition['value'], $condition['operator']);
    }
protected function checkZoneIdByAddressId($condition, $data, $key)
    {
        $address = $this->address->get($data['data']['order'][$key]);

        if (empty($address)) {
            return false;
        }

        $fields = array('country_zone_id', 'state_zone_id', 'city_zone_id');

        $ids = array();

        foreach ($fields as $field) {
            $ids[] = $address[$field];
        }

        return $this->compare($ids, $condition['value'], $condition['operator']);
    }
protected function checkZoneIdByAddressId ( $ condition , $ data , $ key ) { $ address = $ this -> address -> get ( $ data [ 'data' ] [ 'order' ] [ $ key ] ) ; if ( empty ( $ address ) ) { return false ; } $ fields = array ( 'country_zone_id' , 'state_zone_id' , 'city_zone_id' ) ; $ ids = array ( ) ; foreach ( $ fields as $ field ) { $ ids [ ] = $ address [ $ field ] ; } return $ this -> compare ( $ ids , $ condition [ 'value' ] , $ condition [ 'operator' ] ) ; }
Whether the state ID condition is met using an existing address
@param array $condition
@param array $data
@param string $key
@return boolean
Whether the state ID condition is met using an existing address