A useful module for converting currencies in SilverStripe from one to another using the currencylayer.com API
A free currency conversion module for SilverStripe. This modules takes advantage of https://currencylayer.com/ by allowing you to use the free membership, to convert currency from any source to another using simple mathematics
composer require vulcandigital/silverstripe-currencyconversion
api_key
and base_currency
as shown in the configuration belowdev/build
dev/tasks/Vulcan-CurrencyConversion-Tasks-SyncRatesTask
This module requires silverstripe/crontask, please ensure you have followed the configuration instructions if you wish to have exchange rates updated periodically
By default, exchange rates are scheduled to update every 5 minutes: */5 * * * *
, if you would like to change this please see the configuration options below
Vulcan\CurrencyConversion\CurrencyConversion:
api_key: "YOUR-API-KEY" # Get yours from currencylayer.com
base_currency: "NZD" # The default currency to be used in conversions
cron_schedule: "*/5 * * * *" # How often exchange rates will be updated
\Vulcan\CurrencyConversion\CurrencyConversion::convert(1, 'USD'); // will convert 1 USD to the base_currency
\Vulcan\CurrencyConversion\CurrencyConversion::convert(1, 'USD', 'GBP'); // will convert 1 USD to GBP
Module rating system helping users find modules that are well supported. For more on how the rating system works visit Module standards
Score not correct? Let us know there is a problem