Personalized checkout and custom promotions with Shopify Scripts
Hello,
I am new to Liquid, however, I have been searching the docs, and I am still having some trouble.
What would the syntax look like for sorting metafields by their unit of measurement? I have the metafields I want to display in the namespace `specs.`.
Here is the current liquid I have written:
{% if product_specs.size > 0 %}
<div id="specifications">
<ul>
{% for spec in product.metafields.specs -%}
<li><strong>{{ spec.first | capitalize }}</strong>: {{ spec.last.value }}</li>
{%- endfor %}
</ul>
</div>
{% endif %}
Here is the output:
Height: 55 mm
Weight: 2 oz
Width: 25 mm
So, I want Height and Width displayed next to each other, any thoughts or help on this would be greatly appreciated!
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024