Re: Display Variant Metafield on Product Page

Display Variant Metafield on Product Page

roomours
Tourist
12 1 1

Dear Community, 

 

I am trying to have a product variant metafield displayed on the product page via the theme Impulse. 

I created the metafield for delivery time, because our variants may have different delivery times. 

 

What I did / Tried

Created a metafield definition: variant.metafields.global.delivery 

Bildschirmfoto 2022-07-18 um 11.52.29.png

 

Added a value in a variant: 

eingabe metafield guru.png

 

 Added Liquid to custom html in theme: 

Lieferzeit: {{ variant.metafields.global.delivery }} Werktage

 

Bildschirmfoto 2022-07-18 um 11.55.40.png

 

 

So, obviously its not working. 

I dont know liquid, and didnt find an answer in the community so i would be very happy if someone can help me here.. 

Thank you so much

Sarina

Replies 3 (3)

MetafieldsGuru
Shopify Partner
160 32 104

Hi Sarina,

 

You may want to refer to this solved thread for a possible solution.

Check out Metafields Guru, the #1 ranked metafields app.

Bulk editor | Data import/export | Metafield sets | Browser extension

mwhitehouse
Excursionist
14 0 3

Did you find a solution or someone to do this? We're on Impulse and they told me we need to hire a Shopify expert as it needs some code added to the theme.js file. 

roomours
Tourist
12 1 1

No, we ended up hiring an expert, but it is working now. 

I assumed it would work on every variant metafield now (eg when I add material), but it only works for the one I told them about (the delivery time), so be sure to get it right when you hire someone ..