Dawn - Variant metafield change on selection

Topic summary

A user is experiencing issues with variant metafield updates in the Dawn theme. Their current JavaScript code successfully retrieves variant metafields when a customer selects different product variants, but it causes a page reload. This reload creates a specific problem on iOS devices where customers cannot play product media videos after the page refreshes.

The user is seeking an alternative solution that:

  • Updates variant metafields on selection without triggering a full page reload
  • Preserves video playback functionality on iOS

A support representative has responded requesting:

  • Confirmation of the Shopify theme being used (later confirmed as Dawn)
  • Potential theme access to investigate the issue

The discussion remains open with no solution provided yet. The core technical challenge involves implementing dynamic variant metafield updates using JavaScript without forcing page refreshes that break iOS media functionality.

Summarized with AI on November 25. AI used: claude-sonnet-4-5-20250929.

Hi, I have been using the code below to get the variant metafield whenever the variant is selected. However, the problem is, it reloads the page and for some reason on iOS it wont let the customer watch any of the product media videos.

Is there a way to achieve what this code sets to achieve without refreshing the page completely as I think that might be whats causing the issue on iOS.

{% for variant in product.variants %}
{% if product.selected_or_first_available_variant.id == variant.id %}
{{ variant.metafields.custom.dimensions_variants }}
{% endif %}
{% endfor %}

Hi @Creon

Can you kindly let me know what Shopify theme you’re currently using? If possible, please share access to the theme with me. I will help you check it out.

Looking forward to hearing from you!

Hello, the theme is Dawn.