Understanding Namespaces & Keys


Custom Fields is a Shopify Metafield creator and editor. Metafields are made up of a namespace, a key, and a value.

Below, pictured is a Custom Fields value print statement. 


Note: Your Custom Fields machine name will appear as the key for your metafield statement and the namespace will always be 'custom_fields'.

Accessing the raw value stored in the metafield

In order to access this information, first go to the Configure Fields page and click "Edit" on any Shopify item.

At the bottom of the page, you will see a "Metafield Value" statement that you can use to print the value of the field that you set in Custom Fields.


You can print this statement in your Shopify code, but it will only print the value of the field. If you want to use the whole snippet code, see below.

Printing the code entered into the editor, including the HTML, Liquid code and raw value

At the bottom of the edit screen for your field, the "include statement" is the syntax used to print the entirety of the code in the app's code editor for that field.

The difference between this include statement and directly printing the stored value of the metafield is that the include prints all the custom code that appears inside a snippet, rather than just the stored value.