Currency Field (CF)

license
Commercial
version
2.1.1
author
Can Berkol
Last Updated
20.03.2012
Buy Now

This field type enables you to enter financial (numeric) values which automatically will be converted into corresponding exchange rates.

Features

  • Support for all major currencies and most minor currencies.
  • Define a base currency on your own choice.
  • Can convert all supported currencies to one-another on the fly.
  • Select only the currencies you need.
  • Set rounding.
  • Output the currency name anyway you want.
  • Change the position of currency symbol.

WARNING

This ExpressionEngine add-on requires that cURL PHP extension is installed and it requires fopen() function is allowed to access external URLs.

Index

Installation

  1. Download and unzip the package.
  2. Upload the extracted folder into system/expressionengine/third_party/ folder.
  3. Go to Add-ons / Fieldtypes and install the field.

Available Currencies

AED: United Arab Emirates Dirham IDR: Indonesian Ruphias NAD: Namibian Dollars
ANG: Netherlands Antilles Guildes INR: Indian Rupees PLN: Polish Zloty
ARS: Argentine Pesos ILS: Israeli Shekels PYG: Paraguayan Guaranies
AUD: Australian Dollars ISK: Iceland Kronur QAR: Quatar Riyals
AWG: Aruba Florine ISK: Iceland Kronu RON: Romanian Leu
BBD: Barbados Dollar JOD: Jordanian Dinars RSD: Serbian Dinars
BGN: Bulgarian Levs JPY: Japanese Yen RUB: Russian Rubles
BHD: Bahrain Dinars KES: Kenyan Shillings SAR: Saudi Riyals
BMD: Bermuda Dollar KHR: Cambodian Riel SBD: Solomon Islands Dollar
BND: Brunei Dollars KRW: South Korean Won SCG: Seychelles Rupees
BOB: Bolvian Bolivianos KYD: Cayman Islands Dollars SEK: Swedish Kronor
BRL: Brazil Reails KWD: Kuwaiti Dinars SGD: Singapore Dollars
BSD: Bahamian Dollar KZT: Kazakh Tenge SLL: Sierra Leonean Leones
BWP: Botswana Pula LBP: Lebanese Ponds SVC: Salvadoran Colones
CAD: Canadian Dollars LKR: Sri Lankan Rupees THB: Thai Baht
CHF: Swiss Francs LTL: Lithuanian Litai TND: Tunisian Dinar
CLP: Chilean Pesos LVL: Latvian Lat TOP: Tonga Paang
CNY: Chinese Yuan MAD: Moraccon Denar TRY: Turkish Lira
COP: Colombian Pesos MDV: Moldovan Lei TTD: Trinidad Dollars
CRC: Costa Rican Colones MKD: Macedonian Dirham TWD: Taiwan Dollars
CZK: Czech Koruny MMK: Myanmar Kyat TZS: Tanzanian Shillings
DKK: Danish Kroner MNT: Mongolian Tugrik TZS: Tanzanian Shillings
DOP: Dominican Pesos MUR: Marutian Rupees UGX: Ugandan Shillings
DZD: Algerian Dinars MXN: Mexican Pesos USD: U.S. Dollars
EEK: Estonian Kroons NAD: Namibian Dollars UYU: Uruguayan Pesos
EGP: Egyptian Pounds NIO: Nicaraguan Cordubas UZS: Uzbekistani Sum
EUR: Euro NOK: Norwegian Kroner VEB: Venezuelan Bolivars
FJD: Fiji Dollars NPR: Nepalese Rupees VND: Vietnamese Dong
GBP: British Pounds NZD: New Zealand Dollars VUV: Vanuatu Vatu
GRW: Gibraltar Pound OMR: Omani Riyals WST: Samoa Tala
HKD: Hong Kong Dollars PEN: Peruvian Nuevos Soles XPF: Pacific Franc
HNL: Honduran Lenpiras PGK: Papua New Guinean Kina YER: Yemeni Rials
HRK: Croatian Kune PHP: Philippine Pesos ZAR: South African Rands
HUF: Hungarian Forints PKR: Pakistan Rupees ZMK: Zambia Kwacha

Parameters

  • in
    This parameter is used to switch between currency name and currency tag in output.
    currency_tags (If currency tags is provided as value then only tags will be shown i.e. USD; otherwise the whoşe currency name will be shown.)
  • format
    Let's you display the output either as a formatted text or as a number.
    on, off
  • position
    It is used to change the position of the currency symbol.
    before, after
  • round
    Used to define the rounding of the number.
  • show
    It used to show the original amount and currency within paranthesis.
    original
  • show_currency
    Switches the currency on or off. If set to off you only get the number part as output.
    on, off
  • substitute
    Substitutes the original currency with a custom one.
  • to
    Defines to which currency the entered amount needs to be converted.

Usage

Sample scenario: You have save 1,502.00 TL in a custom Currency Field named price.

Basic Usage:

{price format="off" show_currency="false"}

  • output: 1500

 

Currency Conversion:

{price to="USD" show="original"}

  • output: 1,000 US Dollars (1,502 Turkish Liras)

 

Rounding:

{price to="USD" round="2"}

  • output: 1,000.00 US Dollars

Custom Currency Name:

{price to="USD" substitute="TRY:TL,USD:$" show="original"}

  • output: 1,000 $ (1,502.30 TL)

Custom Currency Symbol Positioning:

{price to="USD" position="before"}

  • output: US Dollars 1.000

Currency Tags:

{price to="USD" in="currency_tags"}

  • output: 1.000 USD