I need to show the part number for all product variants. I used variant meta field for that. when, I switch the variant I needs to auto change. This is the code I used to show the variant part number and tried to change the variant. But every time I need to refresh the page to see the updated part number after switching the variant.
I have don't know, how to show the meta field data without refreshing the page. Can anyone help ?
If you are looking for idea please follow. 1) Get the ID of the variant on click of it with the JS. 2) Assign a dynamic ID/attribute with a string to the metafield element. Now get back to first step 1 and use show/hide concept.