Module Description
Enhancement for handling multicurrency in Drupal 8 for Drupal Commerce.
Drupal Commerce 2 supports multiple currencies out of the box. But only for adding prices, not resolving multiple currency prices/orders based on some criteria.
Commerce currency resolver tries to solve resolving prices per currency, calculating those prices and exchange rates between currencies.
Resolving currencies (multicurrency) by following criteria:
* Store (Commerce 2 default behaviour)
* Cookie (basic currency switcher block)
* Language
* Country (using smart_ip or geo_ip)
Mapping by language and country is available trough admin form.
Price calculating is possible by following criteria:
* Automatic - calculation is done from original price based on exchange rates
* Field - dedicated fields for each currency.
* Combo - a combination between 1 and 2.
First, the resolver is looking for specific price field per currency. Otherwise, the price is automatically calculated from the original price.
Price field per currency
Commerce currency resolver does not create fields per currency automatically. Due to several options how prices can be calculated if you choose on settings page "Price field per currency" you need to create for each currency field following this convention: field_price_CURRENCY.
For Croatian Kuna currency, dedicated price field should have machine name: field_price_hrk
Exchange rates
Supported from Commerce Exchanger module
Caching
Cache context per currency is used only for "Cookie" based price resolving. For language and geolocation currency cache context is not necessary (you cannot use two different currencies on language or same location).
To do
* Better documentation
* Implement cookie based GEO mapping
Drupal Commerce 2 supports multiple currencies out of the box. But only for adding prices, not resolving multiple currency prices/orders based on some criteria.
Commerce currency resolver tries to solve resolving prices per currency, calculating those prices and exchange rates between currencies.
Resolving currencies (multicurrency) by following criteria:
* Store (Commerce 2 default behaviour)
* Cookie (basic currency switcher block)
* Language
* Country (using smart_ip or geo_ip)
Mapping by language and country is available trough admin form.
Price calculating is possible by following criteria:
* Automatic - calculation is done from original price based on exchange rates
* Field - dedicated fields for each currency.
* Combo - a combination between 1 and 2.
First, the resolver is looking for specific price field per currency. Otherwise, the price is automatically calculated from the original price.
Price field per currency
Commerce currency resolver does not create fields per currency automatically. Due to several options how prices can be calculated if you choose on settings page "Price field per currency" you need to create for each currency field following this convention: field_price_CURRENCY.
For Croatian Kuna currency, dedicated price field should have machine name: field_price_hrk
Exchange rates
Supported from Commerce Exchanger module
Caching
Cache context per currency is used only for "Cookie" based price resolving. For language and geolocation currency cache context is not necessary (you cannot use two different currencies on language or same location).
To do
* Better documentation
* Implement cookie based GEO mapping
Module Link
Project Usage
1237
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
Drupal Commerce currency resolver module aims to solve the issue of handling multicurrency in Drupal 8, specifically by resolving prices per currency, calculating prices and exchange rates between currencies based on store, cookie, language, and country criteria.
Data Name
commerce_currency_resolver