Using Variant Metafields to Customize Description

Hello all,

Hoping to share a solution that many folks moving to the Dawn theme may find useful, that took me a while to figure out due to limited existing documentation.

As part of redesigning my store recently, a main goal I had was to have a description specific to variants. In the context of my business, this would tell a customer exactly what the kit they’ve selected includes, and was a common point of feedback.

I opted to use variant metafields, preferring to have it integrated into Shopify rather through a separate app, but ran into 2 issues. First, it’s not clear how to add data into these metafields - solved here. Second, it’s not clear how to appropriately display this information on a product page - solved below.

Here’s what the page looks like with the new functionality: https://www.buy-glo.com/products/2007-14-cadillac-escalade

The solution to using variant metafields for custom descriptions by variant - particularly ones that update immediately as customers click on different options - isn’t as intuitive as I feel it should be. However, although time consuming, it is doable using the excellent instructions by Alan Ryan here.

I followed only the first half of the instructions as I only needed one variant metafield. One important note to keep in mind: this does not seem to work for variant metafields formatted as “multiple lines of text”. I stared at that issue for some time, until I changed the metafield to “single line of text” and the solution came to life!

Shout out to @PaulNewton for sharing his wisdom along the way. He knows his stuff. Hopefully, this solution saves someone else the time I spent figuring it out.