Variant Metafield

Topic summary

Issue: Variant-specific metafields (custom fields on Shopify variants) don’t update on variant selection; the correct info only appears after a full page refresh. A product link, screenshot, and a tutorial link were provided.

Findings: The metafields themselves work, but the theme does not dynamically re-render arbitrary content when variants change. Thus, the page content tied to variant metafields remains static until reload.

Proposed approaches:

  • Add custom JavaScript to listen for variant changes and update the DOM accordingly.
  • Use Shopify’s Section Rendering API (AJAX-based re-render of sections) to fetch and replace content on variant change.
  • Some themes may have partial solutions that can be adapted by a code-savvy user.

Status/Outcome: No built-in fix identified; requires custom coding. Two respondents offered paid development help and requested more context (e.g., theme name). The referenced tutorial alone doesn’t provide the dynamic update behavior. Discussion remains open with no implemented solution shared yet.

Summarized with AI on December 16. AI used: gpt-5.

Hey there,

Variant Metafield doesn’t change info when switching between variants.

Here’s the link to the product page: https://060ef5-5.myshopify.com/products/cupcake-catastrophe-ready-to-read-graphics-level-1-chi-chi-a…

I’ve been referring to this tutorial.

https://theprompted.co/blogs/tutorials/use-your-products-as-variants-free-tutorial

Thank you

Hi @Christopher

If you refresh the page after changing the variant, the code you provided works, but doesn’t update with a click. If you want to update the information with variant change, you will need a custom code added. You will need a developer to do this for you. If you are interested we can provide you a competitive quote. Message me if interested.

Hi @Christopher_18 the metafield is working , the page content is not updating arbitrary content when variants change.

An advanced theme customization using javascript to update the info or used the section rendering api, etc is needed to have dynamic variant metafield displays. In some themes there may be pre-existing solutions for the code savvy to cobble something together.

Contact me for customization services.
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.