https://github.com/leowebguy/craft-currency-converter
https://github.com/leowebguy/craft-currency-converter
craft-cms craft-cms-plugin craft-plugin craft4 craft5 craftcms
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/leowebguy/craft-currency-converter
- Owner: leowebguy
- License: mit
- Created: 2020-04-07T22:42:05.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-07-31T12:48:41.000Z (almost 2 years ago)
- Last Synced: 2025-10-27T22:22:12.593Z (8 months ago)
- Topics: craft-cms, craft-cms-plugin, craft-plugin, craft4, craft5, craftcms
- Language: PHP
- Homepage:
- Size: 70.3 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Currency Converter
Craft plugin to convert currency using API & local storage
### IMPORTANT
---
### Installation
Open your terminal and go to your Craft project:
```bash
cd /path/to/project
```
Then tell Composer to load the plugin:
```bash
composer require leowebguy/craft-currency-converter
```
In the Control Panel, go to Settings → Plugins and click the “Install” button for Currency Converter.
Go to [rapidapi.com/natkapral/api/currency-converter5](https://rapidapi.com/natkapral/api/currency-converter5/) → Get your Free API Key
In the Control Panel, go to Settings → Currency Converter → Paste and Save your API Key
You can also put it in your ENV file i.e. `$CC_KEY` and set it over here.
```dotenv
CC_KEY=aaa123bbb234
```

---
### Usage
The plugin exposes a Currency Converter's methods:
```twig
{% set amount = craft.entries.section('my-section').one().numberfield %}
{{ craft.currency.conversion('USD', 'EUR', amount) }}
```
Also passing number as string:
```twig
{{ craft.currency.conversion('USD', 'EUR', 23) }}
```