I’m trying to display my prices in laybuy amounts. So a product costing $139 would be 6 payments of $23.17.
My ‘price’ value is 13900, so I display the following:
{{ price | divided_by: 6 | divided_by: 100 }}
This displays as 23 instead of 23.17
I’ve tried adding 2 points for decimal rounding, but this still just displays as 23.
{{ price | divided_by: 6 | divided_by: 100 | round: 2 }}
2
Answers
You must force the decimal point this way:
{{ price | divided_by: 6.0 | divided_by: 100 }}
Just add
.0
after the divided_by number.