Hi i can create a product meta-field as product.metafields.custom.size.value its working fine on product page
but when am trying to display this value in featured collection products it not displayed there how can i get this value in featured collection for all products
am using this in card-product template
-
Open the
card-product.liquidtemplate in your Shopify theme editor. -
Locate the code section where the featured product information is displayed. It may look similar to this:
{% for product in collections.featured.products %}
### {{ product.title }}
{{ product.metafields.custom.size.value }}
{% endfor %}
- In the example above,
product.metafields.custom.size.valueassumes that the metafield key iscustom, the namespace issize, and the value is stored in thevaluefield. Adjust these values based on your actual metafield structure.
thanks for help i can try this but it not works because i think am doing a mistake over here
{{ product.metafields.custom.size.value }}
because am using it in cart product so i can find a solution for it instead of using product i can replace it with card_product which is right way. once again thanks for reply