Properties

$id

$id : 

Type

$name

$name : string

Type

string — Name

$iso_code

$iso_code : string

Type

string — Iso code

$iso_code_num

$iso_code_num : string

Type

string — Iso code numeric

$sign

$sign : string

Type

string — Symbol for short display

$blank

$blank : integer

Type

integer — bool used for displaying blank between sign and price

$conversion_rate

$conversion_rate : string

Type

string — exchange rate from euros

$deleted

$deleted : boolean

Type

boolean — True if currency has been deleted (staying in database as deleted)

$format

$format : integer

Type

integer — ID used for displaying prices

$decimals

$decimals : integer

Type

integer — bool Display decimals on prices

$active

$active : integer

Type

integer — bool active

$definition

$definition : 

Type

$prefix

$prefix : string

contains the sign to display before price, according to its format

Type

string

$suffix

$suffix : string

contains the sign to display after price, according to its format

Type

string

$currencies

$currencies : array

Type

array — Currency cache

$countActiveCurrencies

$countActiveCurrencies : 

Type

$webserviceParameters

$webserviceParameters : 

Type

Methods

__construct()

__construct(  $id = null,   $id_lang = null,   $id_shop = null) 

Parameters

$id
$id_lang
$id_shop

add()

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

Overriding check if currency rate is not empty and if currency with the same iso code already exists.

If it's true, currency is not added.

Parameters

$autodate
$nullValues

update()

update(  $autodate = true,   $nullValues = false) 

Parameters

$autodate
$nullValues

exists()

exists(integer|string  $iso_code,   $iso_code_num,   $id_shop) : boolean

Check if a curency already exists.

Parameters

integer|string $iso_code

int for iso code number string for iso code

$iso_code_num
$id_shop

Returns

boolean

deleteSelection()

deleteSelection(  $selection) 

Parameters

$selection

delete()

delete() 

getSign()

getSign(string  $side = null) : string

Return formated sign

Parameters

string $side

left or right

Returns

string —

formated sign

getCurrencies()

getCurrencies(  $object = false,   $active = true,   $group_by = false) : array

Return available currencies

Parameters

$object
$active
$group_by

Returns

array —

Currencies

getCurrenciesByIdShop()

getCurrenciesByIdShop(  $id_shop) 

Parameters

$id_shop

getPaymentCurrenciesSpecial()

getPaymentCurrenciesSpecial(  $id_module,   $id_shop = null) 

Parameters

$id_module
$id_shop

getPaymentCurrencies()

getPaymentCurrencies(  $id_module,   $id_shop = null) 

Parameters

$id_module
$id_shop

checkPaymentCurrencies()

checkPaymentCurrencies(  $id_module,   $id_shop = null) 

Parameters

$id_module
$id_shop

getCurrency()

getCurrency(  $id_currency) 

Parameters

$id_currency

getIdByIsoCode()

getIdByIsoCode(  $iso_code, integer  $id_shop) : integer

Parameters

$iso_code
integer $id_shop

Returns

integer

getIdByIsoCodeNum()

getIdByIsoCodeNum(  $iso_code_num, integer  $id_shop) : integer

Parameters

$iso_code_num
integer $id_shop

Returns

integer

getIdByQuery()

getIdByQuery(integer  $id_shop) : \DbQuery

Parameters

integer $id_shop

Returns

\DbQuery

refreshCurrency()

refreshCurrency(  $data,   $isoCodeSource,   $defaultCurrency) 

Refresh the currency exchange rate The XML file define exchange rate for each from a default currency ($isoCodeSource).

Parameters

$data

XML content which contains all the exchange rates

$isoCodeSource

The default currency used in the XML file

$defaultCurrency

The default currency object

getDefaultCurrency()

getDefaultCurrency() 

refreshCurrencies()

refreshCurrencies() 

getCurrent()

getCurrent() : \Currency

Get current currency

Returns

\Currency

getCurrencyInstance()

getCurrencyInstance(  $id) 

Parameters

$id

getConversationRate()

getConversationRate() 

countActiveCurrencies()

countActiveCurrencies(  $id_shop = null) 

Parameters

$id_shop

isMultiCurrencyActivated()

isMultiCurrencyActivated(  $id_shop = null) 

Parameters

$id_shop