Shopify themes, liquid, logos, and UX
How to show collection metafield value to every product on product page that comes under that category...
different collections have different metafield:"material" value...
Hey @CrazyGen_IN
In the product template, try to add below code for collection metafield.
{% assign product_collections = product.collections %}
{% if product_collections.size > 0 %}
{% for collection in product_collections %}
{% if collection.metafields.custom.material != blank %}
<p>Material: {{ collection.metafields.custom.material }}</p>
{% break %}
{% endif %}
{% endfor %}
{% endif %}
To display a collection metafield like "material" on product pages without coding, install a metafield app such as Metafields Guru or Matrixify from the Shopify App Store, ensure each collection has the "material" metafield filled out, follow the app's instructions to configure the display settings, and then preview your product pages to confirm the information appears correctly.
what do you think about this ?
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024