Commerce multicurrency
Commerce multicurrency

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:

  1. Store (Commerce 2 default behaviour)
  2. Cookie (basic currency switcher block)
  3. Language
  4. Country (using smart_ip or geo_ip)

Mapping by language and country is available trough admin form.

Price calculating is possible by following criteria:

  1. Automatic - calculation is done from original price based on exchange rates
  2. Field - dedicated fields for each currency.
  3. 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
Supporting organizations: 
Development & Maintenance
Development of initial 8.x version

Project information

Releases