Currency rates
Every currency has three numbers on the currency list: the auto rate, fetched from a rates service, the custom rate, set by you, and the factor. The rate that is used is:
rate = (custom rate if it is greater than 0, else auto rate) × factor
Rates are relative to the base currency, shop.ini [ExchangeRatesSettings] BaseCurrency (EUR by default), whose rate is 1.
Updating the auto rates
On Store > Currencies, Update auto rates asks the exchange rates update handler for today's rates and stores them as the auto rates of all currencies. When the handler's own base currency differs from BaseCurrency, the rates are converted with the cross rate; a base currency the service does not know gives the error "Unable to calculate cross-rate". A currency the service does not list keeps no auto rate.
No cronjob updates the rates; press the button, or call eZShopFunctions::updateAutoRates() from a cronjob part of your own.
Custom rates and factors
Edit the Custom rate and Factor fields in the list, or on the currency's edit page, and press Apply changes. A custom rate of 0 means "use the auto rate".
After a rate change
Rates only change what auto prices will be. Press Update autoprices to recalculate the auto prices of all products. Custom prices never change.
Related pages
Contributors
- Svitlana Shatokhina
- Graham Brookins Updated Maintainer
Comments
Add a comment