Properties

$id

$id : 

Type

$id_zone

$id_zone : integer

Type

integer — Zone id which country belongs

$id_currency

$id_currency : integer

Type

integer — Currency id which country belongs

$iso_code

$iso_code : string

Type

string — 2 letters iso code

$call_prefix

$call_prefix : integer

Type

integer — international call prefix

$name

$name : string

Type

string — Name

$contains_states

$contains_states : boolean

Type

boolean — Contain states

$need_identification_number

$need_identification_number : boolean

Type

boolean — Need identification number dni/nif/nie

$need_zip_code

$need_zip_code : boolean

Type

boolean — Need Zip Code

$zip_code_format

$zip_code_format : string

Type

string — Zip Code Format

$display_tax_label

$display_tax_label : boolean

Type

boolean — Display or not the tax incl./tax excl. mention in the front office

$active

$active : boolean

Type

boolean — Status for delivery

$definition

$definition : 

Type

$_idZones

$_idZones : 

Type

$cache_iso_by_id

$cache_iso_by_id : 

Type

$webserviceParameters

$webserviceParameters : 

Type

Methods

delete()

delete() 

getCountries()

getCountries(integer  $id_lang, boolean  $active = false, boolean  $contain_states = false, boolean  $list_states = true) : Array

Parameters

integer $id_lang

Language ID

boolean $active

return only active coutries

boolean $contain_states

return only country with states

boolean $list_states

Include the states list with the returned list

Returns

Array —

Countries and corresponding zones

getCountriesByIdShop()

getCountriesByIdShop(  $id_shop,   $id_lang) 

Parameters

$id_shop
$id_lang

getByIso()

getByIso(string  $iso_code, boolean  $active = false) : integer

Get a country ID with its iso code

Parameters

string $iso_code

Country iso code

boolean $active

return only active coutries

Returns

integer —

Country ID

getIdZone()

getIdZone(  $id_country) 

Parameters

$id_country

getNameById()

getNameById(integer  $id_lang, integer  $id_country) : string

Get a country name with its ID

Parameters

integer $id_lang

Language ID

integer $id_country

Country ID

Returns

string —

Country name

getIsoById()

getIsoById(integer  $id_country) : string

Get a country iso with its ID

Parameters

integer $id_country

Country ID

Returns

string —

Country iso

getIdByName()

getIdByName(integer  $id_lang = null, string  $country) : \intval

Get a country id with its name

Parameters

integer $id_lang

Language ID

string $country

Country Name

Returns

\intval —

Country id

getNeedZipCode()

getNeedZipCode(  $id_country) 

Parameters

$id_country

getZipCodeFormat()

getZipCodeFormat(  $id_country) 

Parameters

$id_country

getDefaultCountryId()

getDefaultCountryId() : integer

Returns the default country Id

Returns

integer —

default country id

getCountriesByZoneId()

getCountriesByZoneId(  $id_zone,   $id_lang) 

Parameters

$id_zone
$id_lang

isNeedDni()

isNeedDni() 

isNeedDniByCountryId()

isNeedDniByCountryId(  $id_country) 

Parameters

$id_country

containsStates()

containsStates(  $id_country) 

Parameters

$id_country

affectZoneToSelection()

affectZoneToSelection(  $ids_countries,   $id_zone) : boolean

Parameters

$ids_countries
$id_zone

Returns

boolean

checkZipCode()

checkZipCode(  $zip_code) : \(bool)

Replace letters of zip code format And check this format on the zip code

Parameters

$zip_code

Returns

\(bool)

addModuleRestrictions()

addModuleRestrictions(array  $shops = array(), array  $countries = array(), array  $modules = array()) 

Parameters

array $shops
array $countries
array $modules

add()

add(  $autodate = true,   $null_values = false) 

Parameters

$autodate
$null_values