Skip to content

Shopify Dude Fix

Why Does Variant-Specific Content Not Update When a Shopify Variant Changes?

Variant-specific text or metafields show correctly on page load but stay stale after selection? Liquid rendered once; the theme needs variant-change JavaScript or section rendering.

Quick answer: Variant-specific content stays stale because Liquid renders once on the server, while variant selection happens later in the browser. If a full reload with the selected variant shows the right value, the data is fine; the missing piece is JavaScript or section rendering.

The real symptom

  • SKU, description, metafield, availability text, or custom copy is correct on first load.
  • Changing color or size updates the price but not the custom field.
  • Refreshing with a variant URL parameter shows the correct value.
  • Quick add and the full product page behave differently.

Likely causes

  • Liquid expressions are not reactive after page load.
  • The theme’s variant-change event does not update the custom content region.
  • The custom block is outside the section HTML that the theme rerenders.
  • The theme serializes only basic variant data and omits the metafield.
  • An app or custom picker replaced the native variant controller.

Confirmed fix path

  1. Confirm the correct value renders on a full reload.
  2. Find the theme’s existing product-form or variant-picker JavaScript.
  3. Extend the existing variant-change path instead of creating a second controller.
  4. For modern themes, include the content in the section HTML that gets rerendered for the selected variant.
  5. Retest product page and quick add separately.

Simple checks

  • Watch the URL for a changing variant parameter.
  • Check Console for product-form errors.
  • Check Network for Section Rendering requests after variant selection.
  • Confirm the hidden name="id" input changes with the selected variant.

Useful code or DevTools check

document.addEventListener("variant:change", (event) => {
  const variant = event.detail?.variant;
  const target = document.querySelector("#variant-description");
  if (variant && target) target.textContent = variant.title;
});

The event name and available data are theme-specific; use the theme’s actual event or section-rendering flow.

Do not do this

Do not paste a generic variant script over a modern theme before identifying how the theme already updates price, media, and availability.

Sources