Skip to main content

Currency formatting

Price fields are stored as plain numbers. Use money filters to format them into currency strings so customers see prices the way they expect. This guide covers formatting a price, showing the currency code, and supporting multiple currencies.

Format a price

Price fields such as product.price and variant.price are numbers in the store's main currency unit — for example, 33, not 3300. Always pass a price through a money filter; never output the raw value.

Use money (or its alias money_with_symbol) to format a price with the currency symbol:

{{ product.price | money }}
{{ product.price | money_with_symbol }}
$33.00
$33.00

Use money_without_currency when you need the number without a symbol, such as in a custom layout:

{{ product.price | money_without_currency }}
33.00

Show the currency code

money_with_symbol outputs only a symbol, and several currencies share one — both US and Canadian dollars use $, and Chinese yuan and Japanese yen both use ¥. To remove ambiguity on a total such as the cart, show the currency code next to the amount.

Use cart.currency, which is the currency the customer is currently viewing. It matches the symbol that money_with_symbol renders:

{{ cart.total_price | money_with_symbol }} {{ cart.currency }}
¥225.00 CNY

🚧 Caution

The shop object's shop.currency and shop.currency_code return the store's base currency, not the currency the customer is viewing. Don't use them to label a displayed price: once a multi-currency app converts the amount, money_with_symbol shows the presentment currency (¥) while shop.currency_code still returns the base currency (USD), producing a mismatched label such as ¥225.00 USD.

Support multiple currencies

Multiple-currency display is provided by the Multi-currency app, which a merchant installs from the App Store — it isn't part of the theme. For installation and configuration, see Multi-currency settings. Once the app is active:

  • Once the app is active, prices switch automatically based on the customer's language by default. The merchant can also add a currency switcher to the header from the theme editor for manual selection.
  • Your existing money filters render prices in the customer's selected (presentment) currency automatically — both the symbol and the converted amount update. You don't need to change your Liquid or convert amounts yourself.

For example, the same {{ product.price | money_with_symbol }} that outputs $33.00 for a US customer outputs ¥224.08 once that customer switches to CNY.