Skip to the content
Documentation

Multi-currency

No ratings yet

The webshop of Exponential can sell products in several currencies. A product with a Multi-price attribute has its own price in the currencies you set by hand (custom prices), and prices converted automatically into the others (auto prices). Visitors choose the currency they see, and the basket and orders use it.

The parts

  • Currencies (Store > Currencies, /shop/currencylist): code, symbol, formatting locale, the automatic and custom exchange rates and a rate factor, and the status (active or inactive). Policy shop/setup.
  • The Multi-price datatype (ezmultiprice): custom prices per currency and auto prices for the rest, with a VAT type.
  • Exchange rates: updated from a rates service by an exchange rates update handler (the European Central Bank by default), or set by hand.
  • Preferred currency: chosen by each visitor (shop/preferredcurrency, policy shop/buy), with a default in shop.ini.
  • Products overview (Store > Products overview, /shop/productsoverview, policy shop/administrate): the prices of all products of a class in one currency.
The Currencies page of the Exponential 6 administration under Store, with an empty currency list and the New currency button

Store > Currencies (/shop/currencylist): the currency list, here still empty, with New currency. With currencies it also shows the auto rate, custom rate, factor and status, and the buttons Update auto rates, Update autoprices and Apply changes.

Getting started

  1. Create the currencies you sell in.
  2. Use a Multi-price attribute in your product class, or convert existing Price attributes.
  3. Set the exchange rates, and how auto prices are rounded.
  4. Set the default preferred currency.

Settings

All in shop.ini:

[CurrencySettings]
# the currency a visitor sees before choosing one
PreferredCurrency=USD

[ExchangeRatesSettings]
ExchangeRatesUpdateHandler=eZECB
RepositoryDirectories[]=kernel/shop/classes/exchangeratehandlers
ExtensionDirectories[]=
# the currency the rates are relative to
BaseCurrency=EUR

[MathSettings]
MathHandler=eZPHPMath
RoundingType=round
RoundingPrecision=2
RoundingTarget=false

Limits

  • Auto prices are not updated by a cronjob: after a rate change, press Update autoprices on the currency list.
  • The shipped European Central Bank address needs changing to HTTPS; see Exchange rates update handlers.

Related pages

In this section

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.