This Function Has Been Available Since:|
(AFCommerce v 2.1, Functions v 1.1)
Used to convert one currency to another.
float = afc_convert_currency (old, new, amount)
This function is used by the AFCommerce currency converter, which appears in a pop up window if you enable this feature. Please note: currencies change constantly, and while I was building this feature, some of the currencies were changing daily, so these conversions should be treated as estimates. If the currency converter is an important feature for your store, you may want to edit the values in the database often. The base number system is based on the US dollar, so you will see in the database that the value for the USD is always 1. The value of the other currencies are compared to the USD.
old (string) - The currency that we are starting in, must be the 3 letter string representation of the currency.
new (string) - The currency that we want to convert the amount to, must be the 3 letter string representation of the currency.
amount (string) - The amount of money in the starting currency.
Returns the amount of money in the new currency.
Open Source: No
There are currently no examples for this function.
Back to Functions List