{{ shop.metafields.local.myfieldname }}

1. What is Metafields for Shopify?

Metafields is a native feature in Shopify. It is comparable to custom fields in other applications. You can store extra information about your products, variants, collections, orders, blogs and shop. If you are reading this document and you are a store owner. Please note that this is intended to be used by Shopify designers and developers to extend features of Shopify. Unless you have some knowledge of the templating system used by Shopify, metafields would not be something you have to create by yourselves. It is best to speak to a developer or designer about it.

Each metafield has following attributes:

  • namespace: This is a technical term but it basically means a unique category name for your values. You can make it unique. For example, if you want to add more descriptions to your products. You can call the name space extra-description. It is better not to use space in any of the attributes.
  • key: Describe what kind of information the value attribute is store.
  • value: The actual value you are storing.
  • value_type: Can be either string or interger. If you are storing text information in the value field, select string. If you are storing numbers in the value field, select integer.

Unfortunately, Shopify did not provide a UI to edit metafields assuming only developers or designers would need to use metafields. We have ran into cases when clients would need to use metafields to enter data in shops that designers or developers created that utilizes metafields. Webify has created an application metafields editor. You can install it from Shopify appstore by visiting http://apps.shopify.com/metafields-editor
Once you have installed the application, you can use it to find products and variants. You can then add metafields to either products or variants using the UI.

After you have created metafields, you would often use it in shopify template files to display such information.
If you’ve added to a product a metafield with the following attributes to store extra description for your products.

namespace: product

key: extra-description

value: This is extra description for my products

value_type: string

You can output the value of this metafield in product.liquid with this Liquid tag:   product.metafields.product.extra-description

 

2. How to mass edit metafields for a catalog?

Open Link

 

3. On duplicating the products does metafields also duplicates?

If you duplicate a product, the metafields related the product does not get duplicated.

 

4.  Where is MetaFields Database?

By default your additional files and images are stored in Shopify's CDN and are stored using the Shopify and accessed through their API. So the presence of the metafields does not depend on the app. In fact, you can remove the app and all the metafields will still be there.

You can reinstall this app anytime you like and the metafields you created previously will be available for edition or deletion. No data will ever be lost. 

 

5. Can I include image/video in the metafield extension?

Currently not, you can however extend metafields to include HTML, lists and tables.

 

6.Can I group metafields that can be associated with one or more shopify objects

Currently not possible.

 

7. Can I import/export metafield data and metafield configurations into a new store

Currently not possible. Soon enough, we will deploy this feature along with some more things to add in a future updated version. 

 

8. What should I enter as the 'namespace' and 'key' attributes?

You should consider the 'key' attribute to be the primary name of the metafield. Regarding the 'namespace' attribute, a little more explaining is necessary. Because metafields were created by Shopify mainly for developer use, the 'namespace' attribute was provided to help prevent naming conflicts across multiple developers. For your purposes, think of the namespace attribute as a way to group similar or related metafields together. But if you are only using a few metafields, it's perfectly fine if you use the same namespace value for all of them. You can choose any word you want as long as it's less than 20 characters in length. If in doubt and you want a suggestion, just enter the word 'local' for the namespace value everywhere. That way when you want to display a metafield in one of your store's templates, the naming convention would be something like below: 

{{ shop.metafields.local.myfieldname }}        OR        {{ product.metafields.local.anotherfieldname }}

 

9. Why can't I change the namespace, key or type of a metafield once it contains values?

This is a restriction of the Shopify API to avoid some potentially serious problems.

 

10. What are custom objects?

Imagine that you want to display, inside all your products, a "brand" tab. This brand tab should give a bit of context about the maker of the product: its name, its logo, maybe a bit of history...

Before custom objects, you could simply create those fields into the product definition, maybe inside a "Brand" group to make it easier to organize. Then, you would go over your products, and you would duplicate the same information for all the products that share the same brand. If you have 10 or more products and realize you've made a typo... you're good to start again from zero, by doing the change as many times as you have products for this brand.

Custom objects are an elegant way to solve this issue by allowing you to create your own types, and then creating custom objects for those types. You can then relate those types to a product, article or collection. Now, if you find an error, you just need to edit the text once... and it will update it everywhere.

 

11. What could this app be used for?

  • Create an "author" type, with fields such as name, Twitter URL, Instagram profile, short bio. Then, add a relation to this type within your "Article" resource.
  • Create an "instruction" type, with fields such as description, manual PDF, washing temperature... Then, add a relation to this type within your "Product" resource.
  • Store customer "birth date" using  string. 

 

12. Field types supported?

When you create your metafields definitions, you can choose among different field types. Choosing the appropriate field type is important, as it will help the merchant to more easily edit fields later on.
Here is a description of supported field types:

  • String
  • Integer

 

13. Need help?

Metafields by HulkApps is an app that requires changes to your Liquid files in order to work properly.
As a consequence, if you're not 100% confident with coding, or if you need some advanced usages of metafields, we highly recommend you to contact us, explaining us what you really want.
This way, you will make sure that you do not break inadvertently the theme.

When you contact us, make sure to include as much details as possible about your needs, such as:

Which new information do you need (example: "alternative title for all my products", "short description for my products", "a main image for my pages"...).
Kind of data (for instance: "the alternative title is a short text of approximately 2 words", "the short description can contain a video and an image"...).
Where you want the information to appear in your product, article... pages.

Can't find what you're looking for?

Let us help you. Open a Support Ticket, and we will respond within a day (but usually within a couple of hours).
Send a Support Request