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
product = ShopifyAPI::Product.find(148362461)
product.add_metafield(ShopifyAPI::Metafield.new({ :description => ‘product detail’, :namespace => ‘product’, :key => ‘user’, :value => ‘subscribed’, :value_type => ‘string’ }))
Please guide me on this, how can i able to create a metafield using api… Thanks in advance