Liquid variables doesn't work while customising themes

In the latest version (17.1.67), you can spell out any number in custom theme. For example, to spell out “Balance due” total, you will need to loop through all totals to find “Balance due” total and then just spell out its number by using Liquid filter spell_out. I’m also using capitalize filter so the first letter of spelled out number is capitalized too.

{% for total in table.totals %}
  {% if total.label == 'Balance due' %}
    {{ total.number | spell_out | capitalize }}
  {% endif %}
{% endfor %}
3 Likes