Reputation: 208
i have a created meta filed using the shopify API call like this:
'POST', '/admin/products/1328/metafields.json', array("metafield" =>
array('namespace'=>'inventory',
'key'=>'warehouse',
'value'=>"some text here",
'value_type'=>'string')));
But now I want to show this on product detail page how can I achieve this? Or where it will be displayed on the product detail page in Shopify.
Can anyone (who has a eCommerce shop on any other system but not on shopify) can see these meta fields?
Upvotes: 3
Views: 5163
Reputation: 2648
{{ product.metafields.inventory.warehouse }}
use this line in product.liquid page. Let me know if it doesn't work.
Upvotes: 2
Reputation: 12735
{% for variant in product.variants %}
// to display the variant metafields use {{resource.metafields.namespace.key}}
{{ variant.metafields.ShippingWeight.shipping_weight }}
{% endfor %}
SOURCE : How to Display a Metafield in Shopify
Upvotes: 4