money_with_currency
Formats a given price based on the store's currency format setting - Format with currency code (refer to Setting Up Custom Currency Formats for Your Store).
{{ price | money_with_currency() }} returns a string.
Required params
price integer, float: The amount.
Optional params
-
codestring: The currency code, which defaults to the currency code of the primary market. -
currencycurrency: The currency information, such asiso_code,nameandsymbol.
Examples
Default
{{{ 10000 | money_with_currency() }}}
With the code parameter
{{{ 10000 | money_with_currency(code="USD") }}}
Was this article helpful to you?