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

<pre><code>{% set weightUnits = craft.commerce.settings.weightUnits %}
{% set dimensionUnits = craft.commerce.settings.dimensionUnits %}


{{ variant.weight }} {{ weightUnits }} // 10 mm
</code></pre>

CC BY-SA 3.0
2016-09-15T19:58:22.007Z
Thx Luke. That'll work for me.
Britchie
CC BY-SA 3.0
2016-09-15T04:46:52.927Z
2016-09-15T04:53:17.620Z
2016-09-15T04:53:17.620Z
Luke Holder
<p>Is there comparable syntax to display dimension and weight filter settings from Commerce similar to those for currency eg: <code>{{ variant.price|currency('CAD') }}</code>? Couldn't see any info on this in the docs. </p>

<plugin-craftcommerce><filter>
Filter syntax for Dimensions & Weight?
# Filter syntax for Dimensions & Weight?

(Asked by: username_0 on 2016-09-14)

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.

**Tags:** plugin-craftcommerce, filter


---

## 1 answers

### Answer by username_1 on 2016-09-15. Score: 3 | Accepted answer

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

> **Comments:**
> **username_0**: Thx Luke. That'll work for me.  

---

