<p>Dimensions are set and accessed individually:</p>

<pre><code>{% set variant = product.defaultVariant %}

{{ variant.width }}
{{ variant.height }}
{{ variant.length }}
{{ variant.weight }}
</code></pre>

CC BY-SA 4.0
2018-12-14T14:25:06.350Z
2018-12-14T14:25:06.350Z
Chattervast
<p>I have been unable to locate anything in the docs or any questions on here regarding how to print the dimensions associated with a variant in the template.</p>

<p>All I have managed to find is how to print the dimension unit using the following:</p>

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

<plugin-craftcommerce><plugin-craftcommerce2><variants>
Accessing Commerce product variant dimensions in the template
# Accessing Commerce product variant dimensions in the template

(Asked by: username_0 on 2018-12-14)

I have been unable to locate anything in the docs or any questions on here regarding how to print the dimensions associated with a variant in the template.
All I have managed to find is how to print the dimension unit using the following:
{% set dimensionUnits = craft.commerce.settings.dimensionUnits %}

**Tags:** plugin-craftcommerce, plugin-craftcommerce2, variants


---

## 1 answers

### Answer by username_1 on 2018-12-14. Score: 3 | Accepted answer

Dimensions are set and accessed individually:
{% set variant = product.defaultVariant %}

{{ variant.width }}
{{ variant.height }}
{{ variant.length }}
{{ variant.weight }}


---

