Currency Converter

Free!
Download
Currency Converter
Description

Installation

Copy the folder CurrencyConverter into Statamic's addon folder.

Installation

Copy the CurrencyConverter folder into the addons folder of your site. After that, go into the control panel -> Addons and set the API Key for your site. You can get a key here.

Usage

Template

{{ currency_converter from="USD" to="EUR" amount="99.85" }}
    <div class="bg-grey-darkest text-grey-lighest p-2 mx-4 shadow-inner">
        <span>≈ {{ currency }} {{ converted_amount }}</span>
    </div>
{{ /currency_converter }}`

Also, using a variable you can pass a list of currencies to have multiple conversions. Just like that: {{ currency_converter from="USD" :to="currencies_list" amount="99.85" }}

API

Use public function getConversionRate(string $from, string $to) to get the conversion rate
Use public function convert(number $amount, string $from, string|array $to) to get converted values


Important Links
Details
Released December 6, 2018
Updated 8 months ago
Version v1.0.4
Downloads 208
Requires Statamic 2.10

Andreas Schantl

More by Andreas Schantl

Similar Addons

See All
Only resize images with Glide when they are within set dimensions.

SafeGlide

by Pixel Primate in Media, Utility, Enhancement, Tag
Only resize images with Glide when they are within set dimensions.
Manage and configure XML Sitemaps for your Statamic site with support for aliases, automatic cache management and pagination. $19

XML Sitemaps

by Benji Hughes in Enhancement, Utility
Manage and configure XML Sitemaps for your Statamic site with support for aliases, automatic cache management and pagination.
Extends the static cache with additional features such as disabling caching for authenticated users.

Super Static Cache

by Stefan Wanzenried in Enhancement, Utility
Extends the static cache with additional features such as disabling caching for authenticated users.