Product variant doesnt refresh when selected

I have a product with 3 variant. Im trying to create a custom variant picker so i can comply with the pharmacy regulations.

I am stuck at the point after the variant selection, it does not update the variant without a page reload.

I managed to make an autopage reload so it updates the variant, but how can i achieve the same without a page reload?

This is how my script looks like:


Hi @idanperetz ,

You can use Javascript’s fetch to do this. Refer link

I hope it helps!