Metafields

Use Shopify metafields to add dynamic data to your Nyla site

The Shopify Metafields app allows you to easily add dynamic data to your Nyla site.
For each metafield that exists in Shopify, a reference needs to be added to Nyla so that your site can properly reference the data.
Once added, metafields act like any other property within Nyla.
To add a metafield as a property in Nyla, first you need to add the metafield to Shopify itself. Make sure that you grant access to Storefront API requests when creating the metafield. 

Once you’ve added the metafield to Shopify, you can then go to the Metafields app in Nyla and add it as a new metafield. The metafield type, namespace and key must match exactly what has been entered in Shopify. 

Note: metafields that include the "price" in the namespace or key cannot be used with Nyla due to clashes with other properties. If your metafield includes price in the namespace or key, you will need to substitute it for another metafield without "price". 

After your metafield has been added, then you can use it as a property within the corresponding source(s) in Nyla. 


For performance reasons, it is recommended to only add metafields to be available within a source: collection if they are strictly needed as adding metafields to source collections will negatively impact performance on product listing pages. 

Adding a metafield to your Nyla site


Metafields can be used in conjunction with Shopify line Item properties and cart attributes to send data through to the cart, checkout and beyond. See more on that here.  

Example Use case: 

How do I make a product metafield appear on a grid?

 

See Also