This filter takes a number and formats it as a price, using currency formatting settings that are set up in the Pixfizz Admin under Website → Config → Currency Formatting.
Each individual setting can be overridden when using the filter.
Available parameters are:
format
: Instructs how render the price and the unit. The %u
placeholder represents the unit (currency) and the %n
placeholder represents the formatted number value.negative_format
: Same as the format
parameter, but used when the value is negative. If not given defaults to format
.unit
: The currency sign/type.{{ 1234567890.50 | currency }}
{{ 1234567890.50 | currency: format: '%u %n' }}
{{ 1234567891.50 | currency: precision: 0 }}
{{ 1234567890.50 | currency: unit: '€', separator: ',', delimiter: '' }}
{% comment %}
Output:
$1,234,567,890.50
$ 1,234,567,890.50
$1,234,567,892
€1234567890,50
{% endcomment %}