installment price, discount and how much one will save does not change when I change a variant

New Member
1 0 0

I recently put some code on my site




or up to 3x R$ 39,30 without interest
You save 62% (R $ 60,00)


for this I made the following code

<p style='font-size:17px; color:green'>ou em até <span style="font-weight: bold; font-size:20px;">3x</span> de <span style="font-weight: bold; font-size:20px;"> {{ current_variant.price | divided_by: 3 | money }}</span> sem juros</p>
<div style='color:red; font-weight: bold'>Você economiza {{ product.price | times: 100 | divided_by: current_variant.compare_at_price }}% ({{ current_variant.compare_at_price | minus: product.price | money }}) </div>

however when I change the size variant (which is a different price variant), it does not update the new price and discounts on the site.




when i put a new size and squeeze f5 it loads normal the values


so i think the problem is with javascript that i don't know how to put, can anyone help me ???