Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

May i know does Wordpress ecommerce allow currency selector? I know in Joomla they have this http://dynamicconverter.com/virtuemart where it can auto change the product price immediately after we choose the currency from a dropdownlist.

I am using the template from Templatic and only realized that the currency selector feature is not included in their theme. The sale team said that they do not need to have the currency selector as if i were to pay using Paypal, it already auto calculated based on the buyer currency. Question !!! What if i do not use Paypal? Also, i asked them how much would they charged for adding this currency selector for me but they ignore me and said they do not able to do so... Is that a limitation in their site or am i asking a stupid question there??

Well i am going to give up with that and come to you here for advice..

i have referred to http://wordpress.org/extend/plugins/currency-converter/screenshots/ but this does not meet my requirement. Could you advice?

share|improve this question

closed as too localized by toscho Jul 6 '12 at 20:14

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

As far as I know there is nothing that converts lots of prices "on the fly" for Wordpress, so I guess you have to write it on your own!

Luckily, it's not that hard as it seems, firstly, you need a list of all currencies:

$currency_list = array (
        "DZD" => "Algerian Dinar (DZD)",
        "XAL" => "Aluminium Ounces (XAL)",
        "ARS" => "Argentine Peso (ARS)",
        "AWG" => "Aruba Florin (AWG)",
        "AUD" => "Australian Dollar (AUD)",
        "BSD" => "Bahamian Dollar (BSD)",
        "BHD" => "Bahraini Dinar (BHD)",
        "BDT" => "Bangladesh Taka (BDT)",
        "BBD" => "Barbados Dollar (BBD)",
        "BYR" => "Belarus Ruble (BYR)",
        "BZD" => "Belize Dollar (BZD)",
        "BMD" => "Bermuda Dollar (BMD)",
        "BTN" => "Bhutan Ngultrum (BTN)",
        "BOB" => "Bolivian Boliviano (BOB)",
        "BRL" => "Brazilian Real (BRL)",
        "GBP" => "British Pound (GBP)",
        "BND" => "Brunei Dollar (BND)",
        "BGN" => "Bulgarian Lev (BGN)",
        "BIF" => "Burundi Franc (BIF)",
        "KHR" => "Cambodia Riel (KHR)",
        "CAD" => "Canadian Dollar (CAD)",
        "KYD" => "Cayman Islands Dollar (KYD)",
        "XOF" => "CFA Franc (BCEAO) (XOF)",
        "XAF" => "CFA Franc (BEAC) (XAF)",
        "CLP" => "Chilean Peso (CLP)",
        "CNY" => "Chinese Yuan (CNY)",
        "COP" => "Colombian Peso (COP)",
        "KMF" => "Comoros Franc (KMF)",
        "XCP" => "Copper Ounces (XCP)",
        "CRC" => "Costa Rica Colon (CRC)",
        "HRK" => "Croatian Kuna (HRK)",
        "CUP" => "Cuban Peso (CUP)",
        "CYP" => "Cyprus Pound (CYP)",
        "CZK" => "Czech Koruna (CZK)",
        "DKK" => "Danish Krone (DKK)",
        "DJF" => "Dijibouti Franc (DJF)",
        "DOP" => "Dominican Peso (DOP)",
        "XCD" => "East Caribbean Dollar (XCD)",
        "ECS" => "Ecuador Sucre (ECS)",
        "EGP" => "Egyptian Pound (EGP)",
        "SVC" => "El Salvador Colon (SVC)",
        "ERN" => "Eritrea Nakfa (ERN)",
        "EEK" => "Estonian Kroon (EEK)",
        "ETB" => "Ethiopian Birr (ETB)",
        "EUR" => "Euro (EUR)",
        "FKP" => "Falkland Islands Pound (FKP)",
        "GMD" => "Gambian Dalasi (GMD)",
        "GHC" => "Ghanian Cedi (GHC)",
        "GIP" => "Gibraltar Pound (GIP)",
        "XAU" => "Gold Ounces (XAU)",
        "GTQ" => "Guatemala Quetzal (GTQ)",
        "GNF" => "Guinea Franc (GNF)",
        "HTG" => "Haiti Gourde (HTG)",
        "HNL" => "Honduras Lempira (HNL)",
        "HKD" => "Hong Kong Dollar (HKD)",
        "HUF" => "Hungarian Forint (HUF)",
        "ISK" => "Iceland Krona (ISK)",
        "INR" => "Indian Rupee (INR)",
        "IDR" => "Indonesian Rupiah (IDR)",
        "IRR" => "Iran Rial (IRR)",
        "ILS" => "Israeli Shekel (ILS)",
        "JMD" => "Jamaican Dollar (JMD)",
        "JPY" => "Japanese Yen (JPY)",
        "JOD" => "Jordanian Dinar (JOD)",
        "KZT" => "Kazakhstan Tenge (KZT)",
        "KES" => "Kenyan Shilling (KES)",
        "KRW" => "Korean Won (KRW)",
        "KWD" => "Kuwaiti Dinar (KWD)",
        "LAK" => "Lao Kip (LAK)",
        "LVL" => "Latvian Lat (LVL)",
        "LBP" => "Lebanese Pound (LBP)",
        "LSL" => "Lesotho Loti (LSL)",
        "LYD" => "Libyan Dinar (LYD)",
        "LTL" => "Lithuanian Lita (LTL)",
        "MOP" => "Macau Pataca (MOP)",
        "MKD" => "Macedonian Denar (MKD)",
        "MGF" => "Malagasy Franc (MGF)",
        "MWK" => "Malawi Kwacha (MWK)",
        "MYR" => "Malaysian Ringgit (MYR)",
        "MVR" => "Maldives Rufiyaa (MVR)",
        "MTL" => "Maltese Lira (MTL)",
        "MRO" => "Mauritania Ougulya (MRO)",
        "MUR" => "Mauritius Rupee (MUR)",
        "MXN" => "Mexican Peso (MXN)",
        "MDL" => "Moldovan Leu (MDL)",
        "MNT" => "Mongolian Tugrik (MNT)",
        "MAD" => "Moroccan Dirham (MAD)",
        "MZM" => "Mozambique Metical (MZM)",
        "NAD" => "Namibian Dollar (NAD)",
        "NPR" => "Nepalese Rupee (NPR)",
        "ANG" => "Neth Antilles Guilder (ANG)",
        "TRY" => "New Turkish Lira (TRY)",
        "NZD" => "New Zealand Dollar (NZD)",
        "NIO" => "Nicaragua Cordoba (NIO)",
        "NGN" => "Nigerian Naira (NGN)",
        "NOK" => "Norwegian Krone (NOK)",
        "OMR" => "Omani Rial (OMR)",
        "XPF" => "Pacific Franc (XPF)",
        "PKR" => "Pakistani Rupee (PKR)",
        "XPD" => "Palladium Ounces (XPD)",
        "PAB" => "Panama Balboa (PAB)",
        "PGK" => "Papua New Guinea Kina (PGK)",
        "PYG" => "Paraguayan Guarani (PYG)",
        "PEN" => "Peruvian Nuevo Sol (PEN)",
        "PHP" => "Philippine Peso (PHP)",
        "XPT" => "Platinum Ounces (XPT)",
        "PLN" => "Polish Zloty (PLN)",
        "QAR" => "Qatar Rial (QAR)",
        "ROL" => "Romanian Leu (ROL)",
        "RON" => "Romanian New Leu (RON)",
        "RUB" => "Russian Rouble (RUB)",
        "RWF" => "Rwanda Franc (RWF)",
        "WST" => "Samoa Tala (WST)",
        "STD" => "Sao Tome Dobra (STD)",
        "SAR" => "Saudi Arabian Riyal (SAR)",
        "SCR" => "Seychelles Rupee (SCR)",
        "SLL" => "Sierra Leone Leone (SLL)",
        "XAG" => "Silver Ounces (XAG)",
        "SGD" => "Singapore Dollar (SGD)",
        "SKK" => "Slovak Koruna (SKK)",
        "SIT" => "Slovenian Tolar (SIT)",
        "SOS" => "Somali Shilling (SOS)",
        "ZAR" => "South African Rand (ZAR)",
        "LKR" => "Sri Lanka Rupee (LKR)",
        "SHP" => "St Helena Pound (SHP)",
        "SDD" => "Sudanese Dinar (SDD)",
        "SRG" => "Surinam Guilder (SRG)",
        "SZL" => "Swaziland Lilageni (SZL)",
        "SEK" => "Swedish Krona (SEK)",
        "CHF" => "Swiss Franc (CHF)",
        "SYP" => "Syrian Pound (SYP)",
        "TWD" => "Taiwan Dollar (TWD)",
        "TZS" => "Tanzanian Shilling (TZS)",
        "THB" => "Thai Baht (THB)",
        "TOP" => "Tonga Pa'anga (TOP)",
        "TTD" => "Trinidad&Tobago Dollar (TTD)",
        "TND" => "Tunisian Dinar (TND)",
        "USD" => "U.S. Dollar (USD)",
        "AED" => "UAE Dirham (AED)",
        "UGX" => "Ugandan Shilling (UGX)",
        "UAH" => "Ukraine Hryvnia (UAH)",
        "UYU" => "Uruguayan New Peso (UYU)",
        "VUV" => "Vanuatu Vatu (VUV)",
        "VEB" => "Venezuelan Bolivar (VEB)",
        "VND" => "Vietnam Dong (VND)",
        "YER" => "Yemen Riyal (YER)",
        "ZMK" => "Zambian Kwacha (ZMK)",
        "ZWD" => "Zimbabwe Dollar (ZWD)");

And this address: http://download.finance.yahoo.com/d/quotes.csv?s=[data]=X&f=l1&e=.csv

Now, if you want to convert prices from USD to GBP then you have to get the data from http://download.finance.yahoo.com/d/quotes.csv?s=GBPUSD=X&f=l1&e=.csv & multiply all the values by .cvs output.

share|improve this answer
1  
Thanks so much for the reply. But i think i don really get you. Do you meant I should add the $currency_list = array.. to my code? which file are you referring to? And how does the excel file you pasted reflect the price changes on my website? – belinq Jul 30 '11 at 2:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.