Shopify » Weight

A Shopify Weight type allows you to select a unit and a decimal value to go with that unit. Weight units can be any of oz, lb, g or kg. The entered weight is then available as a JSON structure with unit and value properties, for example:

{% assign weight = product.metafields.accentuate.weight.value %}
<p>The weight is {{ weight.value }}{{ weight.unit }}</p>

Referencing .value alone will render the output as "value<space>unit", so this works as well:

<p>The weight is {{ product.metafields.accentuate.weight.value }}</p>

Last updated