Skip to main content
Version: 2.0.0

Currencies

Navigate to yStore → Store → Currencies.

The Currencies section lets you define which currencies your store accepts, set exchange rates (manually or via an external API), and control how prices are formatted for each currency.


How multi-currency works


Currency fields

FieldDescription
CodeISO 4217 currency code — e.g. EUR, HUF, CZK
NameDisplay name — e.g. "Euro", "Hungarian Forint"
SymbolCurrency symbol — e.g. , Ft,
Symbol positionBefore or after the amount
Decimal placesNumber of decimal digits (2 for most currencies, 0 for HUF/JPY)
Decimal separatorCharacter used for the decimal point (. or ,)
Thousands separatorCharacter used for thousands grouping (,, ., or space)
Exchange rateRate relative to the base currency
Rate sourceManual or automatic (external API)
EnabledWhether this currency is selectable on the storefront

Base currency

The base currency is the primary currency in which your product prices are defined. All other currencies are expressed as exchange rates relative to the base.

Changing the base currency

Changing the base currency after products are priced is a destructive operation — all stored prices remain in the old base. If you need to change the base currency, do it before entering product prices, or recalculate all prices manually afterwards.


Exchange rate sources

SourceHow it worksBest for
ManualYou enter the rate directly and update it yourselfFixed-rate contracts, B2B pricing, small catalogs
External APIyStore fetches the latest rate from a configured exchange rate API on a scheduleConsumer stores with live pricing, high-volume multi-currency

To configure the exchange rate API, go to yStore → Settings → Store → Config and enter the API URL, key, and refresh interval.


Adding a currency

  1. Go to yStore → Store → Currencies.
  2. Click New Currency.
  3. Enter the ISO code (e.g. HUF).
  4. Fill in the name, symbol, and symbol position.
  5. Set decimal places and separators to match the currency's formatting conventions.
  6. Enter the exchange rate relative to your base currency.
  7. Choose the rate source: Manual or API.
  8. Enable the currency and save.
Formatting examples
CurrencyDecimal placesFormat example
EUR2€29.90
HUF07 490 Ft
CZK2729,00 Kč
USD2$29.90
JPY0¥3,200

Currency in orders and reporting

Orders are stored in the customer's selected currency at the time of purchase. The exchange rate at the moment of order placement is also stored, so historical reports remain accurate even if rates change later.

Revenue reports in the admin can be viewed in:

  • The base currency (all orders converted at their stored rate)
  • A specific currency (only orders placed in that currency)

CLI: updating exchange rates

# Fetch and update all exchange rates from the configured API
php craft yui/currencies/update-rates

# Update a specific currency pair
php craft yui/currencies/update-rates --code=HUF

Run this on a cron schedule to keep rates current:

# crontab — update rates every day at 06:00
0 6 * * * /path/to/php /path/to/craft yui/currencies/update-rates