Can variant metafield and liquid code add dynamic descriptions?

Hello, I have an idea on how to implement variant description without using an app.

The idea is very simple, is it possible to use variant metafield to store the description data and with a custom product template, injecting the description with liquid code.

The problem is I cannot find the javascript file to switch variant description dynamically when the user press the button.

Do you know where is it?

Does it depend on the them?

I am using Empire by Pixel union a 2.0 template.

Hi @antonioreale ,

You can use classList toggle to show and hide. Notice the second metafield already have the classList “hide-element.” See the code below for reference


Your metafield_1 code here....

Your metafield_2 code here....