Conversations about creating, managing, and using metafields to store and retrieve custom data for apps and themes.
I want to create metafield for a customer on shopify site when he logged in, i have gone through all forums, docs of shopify but no success, i found this link (http://www.shopify.com/technology/3032322-new-feature-metafields) where it can be done through api but i don't know how can i use api on liquid theme following example given on above url
<code>
product = ShopifyAPI::Product.find(148362461)
product.add_metafield(ShopifyAPI::Metafield.new({ :description => 'product detail', :namespace => 'product', :key => 'user', :value => 'subscribed', :value_type => 'string' }))
</code>
Please guide me on this, how can i able to create a metafield using api.... Thanks in advance
You can't access the API like that via liquid. The API is used to create apps that run on your own servers in your favourite programming language. Those apps can be either privately for just your shop or used by multiple shops in the App store.
To learn more visit the Shopify Help Center or the Community Blog.
Can you send me link for PHP Programming language so i can use that api and how can i integrate that in Shopify apps ?
You can learn more about the API here: http://docs.shopify.com/api and some PHP plugins that use the API can be found here: http://docs.shopify.com/api/libraries/php
To learn more visit the Shopify Help Center or the Community Blog.