Money filters

Money filters format prices based on the Currency Formatting found in General Settings.

Money format settings

money

Formats the price based on the shop's HTML without currency setting.

Input

{{ 145 | money }}

Output

<!-- if "HTML without currency" is ${{ amount }} -->
$1.45
<!-- if "HTML without currency" is €{{ amount_no_decimals }} -->
€1

money_with_currency

Formats the price based on the shop's HTML with currency setting.

Input

{{ 1.45 | money_with_currency }}

Output

<!-- if "HTML with currency" is ${{ amount }} CAD -->
$1.45 CAD

money_without_trailing_zeros

Formats the price based on the shop's HTML with currency setting and excludes the decimal point and trailing zeros.

Input

<!-- if "HTML with currency" is ${{ amount }} CAD -->
{{ 2000 | money_without_trailing_zeros }}

Output

$20

Only trailing zeros are removed, not other digits:

Input

<!-- if "HTML with currency" is ${{ amount }} CAD -->
{{ 145 | money_without_trailing_zeros }}

Output

$1.45

money_without_currency

Formats the price using a decimal.

Input

{{ 145 | money_without_currency }}

Output

1.45

Want to discuss this page?

Visit the Shopify Community