Your EE module, plugin, and extension marketplace!

Our Newsletter


Click to enlarge

Exchange Rates Module

RRP:
Price:
$0.00
Vendor:
PutYourLightsOn
Brand:
Weight:
Rating:
()
Availability:
Shipping:
Gift Wrapping:

Quantity:


Product Description

 

This is an Expression Engine module that allows you to get live currency exchange rates.

* Current Version: 1.1 (released 21 February 2009)
* Works with ExpressionEngine 1.6 and higher.


Concept

This module provides the ability to display prices in multiple currencies using live exchange rates. The rates are taken from the European Central Bank website and are updated daily.


How It Works

The Exchange Rates module can be called from within a template as well as from an add-on. Every time the module is called it checks if the currency exchange rates have been updated in the last hour. If not then it automatically updates them.


Getting the exchange rate from one currency to another:

{exp:exchange_rates:get_rate from="EUR" to="USD" decimals="5"}
	

The from parameter is required and represents the currency code of the currency we want to get the rate from.

The to parameter is required and represents the currency code of the currency we want to get the rate to.

The decimals parameter is optional and if included defines how many decimal places the result will have.


Converting a specified amount from one currency to another:

{exp:exchange_rates:convert amount="100" from="USD" to="JPY" decimals="2"}
	

The amount parameter is required and represents the amount that we want to convert. The amount value can be a field value within a weblog entries tag.

The from parameter is required and represents the currency code of the currency we want to convert from.

The to parameter is required and represents the currency code of the currency we want to convert to.

The decimals parameter is optional and if included defines how many decimal places the result will have.


The module can be called from within an add-on as follows:

// create exchange rate object
if (!class_exists('Exchange_rates'))
{
	require '/home/mypath/public_html/system/modules/exchange_rates/mod.exchange_rates.php';
}

$ER = new Exchange_rates();

$USD_to_EUR_rate = $ER->get_rate('USD', 'EUR');
	

Installation

Download and unzip exchange_rates.zip, then follow the steps below:

  1. Upload the exchange_rates folder to the system/modules folder
  2. Upload lang.exchange_rates.php to the system/language/english folder
  3. Install the Exchange Rates module (Control Panel -> Modules -> Install)

 

 

Changelog

Version 1.1

  • Added decimals parameter

 


Find Similar Products by Category

Write your own product review

Product Reviews

This product hasn't received any reviews yet. Be the first to review this product!

Add to Wish List

Click the button below to add the Exchange Rates Module to your wish list.

Related Products

You Recently Viewed...




Clicky Web Analytics