Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Convert Currencies

1 sites No security coverage Drupal 9–11
View on drupal.org

This module provides real-time currency conversion and management for your Drupal site. It automatically fetches exchange rates from the Fixer API and offers an easy-to-use interface for administrators and developers to integrate currency conversions into their projects.

Convert Currencies

Convert Currencies is a robust, modern Drupal 9/10/11 module for real-time currency conversion and management. It provides a user-friendly admin interface, developer-friendly services, and a flexible architecture designed for extensibility and future-proofing.

🚀 Features

  • Real-time Exchange Rates: Automatic updates via the Fixer API (free plan supported)
  • Smart Cron System: Configurable update intervals (15min to daily) using Drupal’s built-in cron
  • Multiple Currency Support: Easily add, remove, or manage any ISO 4217 currency
  • Admin UI: Intuitive configuration and management at /admin/config/fixer_currencies
  • Developer API: Simple service for converting prices in custom code
  • Cache Management: Automatic cache invalidation for up-to-date data
  • Rate Limiting: Prevents excessive API calls
  • Error Handling: Comprehensive logging and user feedback
  • Drupal 11 Compatible: Built with modern PHP and Drupal standards

⚡ Quick Start

  1. Install and enable the module (Composer or manually)
  2. Get a free API key from Fixer.io
  3. Go to /admin/config/fixer_currencies and enter your API key
  4. Add the currencies you need (using ISO 4217 codes)
  5. Set your base currency and update interval
  6. Run cron or wait for automatic updates

🛠️ Why Fixer API?

The Fixer API is a reliable, developer-friendly service with a generous free tier. The module is architected to allow for additional providers in the future—contributions are welcome!

💻 Developer Usage

Use the provided service for conversions:

$converter = \Drupal::service('convert_currencies.converter');
$amountInEur = $converter->convert(100, 'usd', 'eur');

All features are available via dependency injection for custom modules.

🔄 Extensibility

The codebase is designed for easy extension:
The conversion service is decoupled and can be refactored to support multiple providers.
Adding a new API source would involve implementing a new provider class and updating the service to use it (see TODO.md for roadmap).

❓ FAQ

Can I use a different API provider?

Not yet, but the code is structured for easy extension. Multi-provider support is on the roadmap.

Why is my base currency locked to EUR?

The free Fixer API plan only supports EUR as the base currency.

How do I force an immediate update?

Run cron or use Drush: drush cron

What happens if the API is down?

The module logs an error and keeps the last known rates.

💡 Example Use Cases

E-commerce sites needing up-to-date product prices in multiple currencies
Financial dashboards displaying real-time exchange rates
Custom blocks or pages showing currency conversions for users

🔐 Permissions

Administer currencies: Required to manage currencies, conversion rates, and Fixer API settings.

🗑️ Uninstall

Disable the module via the admin UI or Drush: drush pmu convert_currencies
All configuration and currency entities are removed automatically—no manual cleanup required.

🏆 Comparison with Currency module

Convert Currencies focuses on:

  • Simplicity and modern code
  • Real-time rates via Fixer API
  • Easy admin UI and developer API
  • Designed for extensibility (multi-provider support planned)

Currency module offers:

  • Extensive multi-currency support
  • Integration with Drupal Commerce
  • More complex configuration and features

Can they both be used?

Yes! If you need a lightweight, modern, and easily extendable solution for real-time rates, use Convert Currencies.
If you need deep integration with Commerce or advanced multi-currency workflows, Currency may be a better fit.

🧪 Testing

Unit tests included (run via Drupal UI or PHPUnit)
Kernel and functional tests planned

⚠️ Known Limitations

  • Only EUR as base currency (Fixer API free plan limitation)
  • Only Fixer API supported (multi-provider support planned)
  • No historical rate tracking (planned)
  • No currency symbol/formatting support (planned)
  • No REST or GraphQL endpoints (planned)
  • No multi-language support for currency names (planned)

Next Steps

If you want to add multi-provider support, see the TODO.md and consider contributing a provider interface and a new provider class.
For any issues or feature requests, use the Drupal.org issue queue.

Built with ❤️ for the Drupal community

Depends on

Dependencies of the latest stable release

  • config Drupal core
  • token Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jul 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.1 Stable 9–11 Jul 20, 2025