Hello, I’m want to write a code that shows a custom meta field on a product page from a different product listing.
So for example product X has a custom meta field for an icon with text:
{% if product.metafields.my_fields.icon_1_text != blank %}
- {{ product.metafields.my_fields.icon_1_text }}
{% endif %}
With this, an icon image and text show on the product page of product X.
Now I create a bundle product. I call this product Y. On the product page of product Y, I want to show the icon img and text of product X. So I create a Product Reference meta field on Product Y and refer it to Product X.
So far so good I guess.
I know how to show the title, product image or description. I can get that with this code:
Product X title
{{ product.metafields.custom.giftset-1 | metafield_text }}
Product X description
{% if product.metafields.custom.giftset-1 != blank %}
{% assign giftset-1 = product.metafields.custom.giftset-1.value %}
{{ giftset-1.description }}
{% endif %}
However, I can’t get to figure out how to write the code to show the icon image and text from Product X on the page of Product Y.
Anyone can help me with this?