Product discount percentage not changing dynamically

I am using the code below to showcase the product discount. However, the discount is not updating dynamically when I change the variant. It only updates after reloading the page. Please suggest a solution.

Website- https://taoparis.in/products/tao-paris-women-solid-block-heels-4?variant=40449742110916

{% if product.selected_or_first_available_variant.compare_at_price > product.selected_or_first_available_variant.price and product.selected_or_first_available_variant.inventory_quantity > 0 %} {{ product.selected_or_first_available_variant.compare_at_price | minus: product.selected_or_first_available_variant.price | times: 100.0 | divided_by: product.selected_or_first_available_variant.compare_at_price | round }}% OFF {% endif %}

Hi @Mukuldm ,

We need to add JS code for changing the discount off on option changes.

Let me know if you need any help with the custom coding.

Thank you

Can you please help me with the code?

Hi @Mukuldm ,

Can you please provide me the access to the store?

Thank you

Please share the collaboration access on 0322.

Please help us with the solution. I will pay you for the same.