How to set preset line item properties keys for certain products - YagiSoftware/DraftHelper GitHub Wiki

If you would like to add preset line item keys for certain products (eg: "Size", "Color" for a plushie), which they will be shown automatically when you use the "Edit line item properties" feature of the app, please follow along this tutorial.

1. Create metafield to hold the preset values for product

First, go to your store settings > Custom Data

Go to Store Settings > Custom Data

Next, select "Products" and click "Add definition"

select Products

add definition

For the input, use these values

Name = "Preset Line Item Keys" Namespace and Key = "draftable.preset_keys" (must be exact match, please copy and paste) Description = "Preset Line Item Keys"

For data type, select "Single line text", and select "List of Values", then click "Save"

product definition

click Save

2. Add the preset keys to the product you want

After saving the metafield definition, go to your product in Shopify Admin, and click "View all" in the Metafields section :

Edit product metafield

Add the preset item keys you want

After adding, now when you use the "Edit Line Item properties" feature of the app, the preset will be shown automatically in the product : Auto show product line item properties keys