how do I make the sku section on product page dynamic?

Topic summary

A user is trying to make the SKU (Stock Keeping Unit) display update automatically when customers select different product variants, without requiring a page refresh.

Current Issue:

  • The SKU is visible on the product page but doesn’t change dynamically when variants are selected
  • The user added custom code to product.liquid that displays the SKU but requires manual page refresh

Proposed Solutions:

  1. JavaScript approach: One responder provided a JavaScript snippet that listens for variant change events and updates the SKU element dynamically. The user tried this but reported it didn’t resolve the issue.

  2. Liquid block method: Another contributor suggested creating a custom “Liquid” block through the theme customizer and adding specific code there, rather than directly in product.liquid.

Current Status:

  • The discussion remains unresolved
  • The most recent exchange involves troubleshooting the Liquid block implementation
  • The helper is requesting to see where the code was actually added, noting it’s not currently visible on the product pages
  • There appears to be confusion about proper code placement (snippet vs. theme customizer block)
Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

Hey @michelle012 ,

I would love to help out but I’m not sure what you are trying to achieve, so if you could ellaborate a little more and maybe provide an example from another website it will be great.

If you mean to just show the SKU on the product page, you can add that block inside your theme’s customization, just edit the product template.

Sincerely,
Lior from Studio Enchant