3

Is there comparable syntax to display dimension and weight filter settings from Commerce similar to those for currency eg: {{ variant.price|currency('CAD') }}? Couldn't see any info on this in the docs.

1 Answer 1

3

There is currently no filter but you can access the units of measurement from your settings, and display the measurement:

{% set weightUnits = craft.commerce.settings.weightUnits %}
{% set dimensionUnits = craft.commerce.settings.dimensionUnits %}


{{ variant.weight }} {{ weightUnits }} // 10 mm
1
  • Thx Luke. That'll work for me.
    – Britchie
    Sep 15, 2016 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.