commerce_currency_resolver
Enhancement for handling multi-currency Drupal Commerce.
Drupal Commerce 3 supports multiple currencies out of the box.
Commerce currency resolver tries to solve resolving prices per currency by various criteria, calculating those prices and exchange rates between currencies.
Resolving currencies (multi-currency) by following criteria:
- Store (Commerce Core default behavior)
- 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. You can set in administration the desired prefix for these fields, by default fields should be following convention `field_price_eur' etc..
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).