Thank you for your quick response.
I’ve implemented the JavaScript code you provided inside the custom liquid, ensuring that I updated the IDs to match my setup. For “Code 1,” I used the ID “variant-test-price1” for ‘variant-selector’ and I selected the picker with the ID “variant-radios-template–15595519115401__main” for ‘product-price’.
However, it appears that the script doesn’t work in my case. The liquid content within “variant-test-price1” remains static when I select different variants using the variant picker. To clarify my goal, In this case I want, “variant-test-price1” to dynamically update with the correct value and currency using an Ajax script, not the pricing underneath the product title.
Regarding the currency symbol (‘$’) used in the script, how would it would work if multiple currencies are enabled in the shop. Is there a way to make it currency-agnostic? Right now I use “€” EUR.
As for “Code 2,” it contains two liquid values within it. Will this work as is, or do I need to restructure the HTML?
The variant picker has this rendered html on my store:
To trigger a change event, I’m using the ID “variant-radios-template–15595519115401__main”. Is this the correct approach in my case?
I included some images and my test store for reference, the password is: 123
https://teststore-9992.myshopify.com/products/soap?variant=41417412182153
Images:
https://imgur.com/a/z5PxovO
Currently, both Code 1 and Code 2 only display values when a variant is selected and the page is reloaded.
Thank you once again for your assistance.