On Your Site
Local Development
Site Code
Guides
Site Configuration
Content Management
Forms
Form API
Templates
Site Config
Currencies
These Dijon Platform site configuration methods allow you to manage how Dijon Platform handles currencies.
setCurrencies
Set which currencies should be used for different countries.
Example
$config->setCurrencies([
'EUR' => [
'countries' => [
'AT','BE','CY','EE','FI','FR','DE','GR','IE','IT',
'LV','LT', 'LU','MT','MC','ME','NL','PT','ES','SK',
'SI','TR','VA'
],
'Symbol' => '€',
],
'GBP' => [
'countries' => ['GB'],
'Symbol' => '£',
],
'USD' => [
'countries' => ['US'],
'Symbol' => '$',
]
]);
setDefaultCurrency
This sets the default currency to be used on a page, if there are no more specific rules.
Example
$config->setDefaultCurrency('USD');