money_ without_ trailing_ zeros
number | money_without_trailing_zeros
returns string
Formats a given price based on the store's HTML without currency setting, excluding the decimal separator
(either .
or ,
) and trailing zeros.
If the price has a non-zero decimal value, then the output is the same as the money
filter.
{{ product.price | money_without_trailing_zeros }}
{{ product.price | money_without_trailing_zeros }}
{
"product": {
"price": "10.00"
}
}
Output
$10
Was this page helpful?