View Converted Currency
Converts currencies in realtime by using Xurrency.com. Refer to http://xurrency.com/currencies for the list of available currencies.
Xurrency.com requires that you purchase a license for commercial usage.
Table of Contents
Parameters
price
This is the number that needs to be converted. You can pass in values with formatting, e.g. ($10.27) and any non-number content will be automatically stripped. If you plan to pass in a dynamic number, you will also need to add the parse="inward" parameter.
price="10"
currency_code
Original currency code to convert from. If this is not a valid currency code, your original amount will be returned without warning. USD is the default if left blank.
currency_code="USD"
new_currency_code
Currency to convert to. If this is not a valid currency code, your original amount will be returned without warning. USD is the default if left blank.
new_currency_code="GBP"
api_key
Your Xurrency.com API key.
api_key="ABCDEF"
use_prefix
If set to a TRUE value, the currency prefix related to the
currency_code
will be returned (Pound symbol, dollar symbol, yen
symbol, etc)
use_prefix="yes"
Examples
{exp:cartthrob:view_converted_currency price="10" currency_code="USD" new_currency_code="GBP"}