but the SKU doesn’t update automatically when a different variant is chosen. For e.g. A4 or A5 options of a product. The same first SKU code is displayed unless you refresh the page and then it updates.
I’ve tried inserting some the .js code that I’ve seen on other posts but it doesn’t make a difference.
Beyond that it’s an advanced theme customization that varies by theme.
Reach out to me for customization services to get it done properly. (click profile pic on forums)
Your theme’s javascript file doesn’t contain _updateSKU function. That’s why it doesn’t update when a different variant is selected. You can either find out what the specific code that will work with your theme, or choose a different theme.
Hi @SHOUT-OUT ,
SKU is displaying correctly on page load, but not updating when the customer switches variants. That happens because the Liquid code you’re using, Try below steps:
Step 1: Add a container for the SKU
In your product template (usually main-product.liquid or product-form.liquid), wrap your SKU in an identifiable element: