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!
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024