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
| Field | Description |
|---|---|
| Code | ISO 4217 currency code — e.g. EUR, HUF, CZK |
| Name | Display name — e.g. "Euro", "Hungarian Forint" |
| Symbol | Currency symbol — e.g. €, Ft, Kč |
| Symbol position | Before or after the amount |
| Decimal places | Number of decimal digits (2 for most currencies, 0 for HUF/JPY) |
| Decimal separator | Character used for the decimal point (. or ,) |
| Thousands separator | Character used for thousands grouping (,, ., or space) |
| Exchange rate | Rate relative to the base currency |
| Rate source | Manual or automatic (external API) |
| Enabled | Whether 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 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
| Source | How it works | Best for |
|---|---|---|
| Manual | You enter the rate directly and update it yourself | Fixed-rate contracts, B2B pricing, small catalogs |
| External API | yStore fetches the latest rate from a configured exchange rate API on a schedule | Consumer 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
- Go to
yStore → Store → Currencies. - Click New Currency.
- Enter the ISO code (e.g.
HUF). - Fill in the name, symbol, and symbol position.
- Set decimal places and separators to match the currency's formatting conventions.
- Enter the exchange rate relative to your base currency.
- Choose the rate source: Manual or API.
- Enable the currency and save.
| Currency | Decimal places | Format example |
|---|---|---|
| EUR | 2 | €29.90 |
| HUF | 0 | 7 490 Ft |
| CZK | 2 | 729,00 Kč |
| USD | 2 | $29.90 |
| JPY | 0 | ¥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