Use metafields to create dynamic, easy to manage sources
Source: Product and Source: Collection can pull in value from Shopify metafields. This is a useful feature in a few different use cases, but especially so when you want to reference the same collection or source product in multiple places on the same product page in order to cut down on manual maintenance.
This article walks you through:
Example use cases
Use cases can include:
- When you reference the same collection on different places on a PDP
- For example, if you are using "related product swatches" on your PDP in both the PDP above the fold and the sticky add to cart
- When you want to bulk edit these values across different products in Shopify
- For example, if you have a larger catalogue and want to choose what collections to show on your Cross Sells across all product pages
- When you already have collection or product references on your product catalogue and want to continue using these upon moving to Nyla
Using metafields in Source Product & Source Collection
Follow these steps to set metafields as your Source Product or Source Collection:
- Add a metafield to your Shopify and enable it in Nyla.
- Ensure you add the correct definition to your metafield in Shopify
- For a source collection, you should set a Collection Type
- For source product, you should set a Product Type
- Use your metafield as a property in the source collection / source product picker to reference the product/collection field you want to reference.
- In order to do this, you should paste in the metafield property into the Source Product / Source Collection picker in Nyla
- Then click on the Use property: XXX on the picker itself to set the metafield as the property referenced by the source