Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am working with a shopify 2.0 theme and I would like to include relevant product datapoints (meta fields) in the product.description property.
Examples—
I need these rendered specifically in the description property so that each key:value are available and readable for outside listings.
I am currently producing this list on my store product page using a snippet right under the description, but my ultimate goal is to make these meta fields the product.description content inclusion.
Hi @iwogujek
you can try it in this way
admin editor
product page preview
demo code
// get all metafields here
{% capture metafields_for_description %}
<ul>
<li>Product Type : {{ product.metafields.custom.product_type }}</li>
</ul>
{% endcapture %}
// replace mark with metafields html content
{% capture description_with_metafield %}
{{ product.description | replace: "$[metafield_mark]", metafields_for_description }}
{% endcapture %}
// replace product.description with description_with_metafield
{{ description_with_metafield }}
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