Metafields for Product Variants

Hello,

I am trying to add different descriptions for each Product Variant, by adding meta fields.

My product comes in two variants and I want to display a different text, depending on the category you click.

I don’t know a thing about coding, is there a way to do this without editing the Code?

I tried it by creating a new metafield Definition but it shows the same text for both Vatiants.

Would be highly appreciated if someone could help me!

I am using the Impulse theme

thanks

1 Like

Displaying the variant metafields on the product page is quite a tricky task. Sadly, it’s not possible to make them visible without editing the code. The thing is that Liquid code can’t react to any changes on the product page dynamically, which means that you’ll have to add some JavaScript code to make it possible. Here’s the link to a similar thread.

Hi @lailalaila

I’m afraid that this would require coding skills to change the display. Also, you’re using product.metafields so it will show the same text for both variants. In case you display a different text, you need to product variant metafields.