Skip to content

Currency functions

Moisés Barrachina Planelles edited this page Oct 4, 2023 · 2 revisions

Backend Frontend Template provides several functions about currencies:

$this->currencies_array_get()

Returns a currency list with all the data, including the numer of currency on the ISO 4217 standard
  $currencies_name_and_symbol = [
		'ARS' => [
			'id'   => 'ARS',
			'name'   => 'Argentina Peso',
			'symbol' => '$',
			'code' => '032',
		],
		'AWG' => [
			'id'   => 'AWG',
			'name'   => 'Aruba Guilder',
			'symbol' => 'ƒ',
			'code' => '533',
		],
		[...]

$this->currencies_selector_get()

Returns a currency list
  $currencies_name_and_symbol = [
		'ALL' => 'L - Albania Lek',
		'AFN' => '؋ Afghanistan Afghani',
		'ARS' => '$ Argentina Peso',
		'AWG' => 'ƒ Aruba Guilder',
		[...]

$this->currency_symbol_get($currency_id)

Returns the currency symbol through the currency code

$this->currency_code_get($currency_id)

Returns the ISO 4217 number through the currency id
Clone this wiki locally