Hello, so I have a product with variant sizes, i have a variant price and a compare at price. They both seem to work, i added with code the price difference between those 2 and it also works but when I change size variants the price difference is not changing but the other 2 change correctly. If I refresh the product at the current variant it correctly displays it but if I change size again it keeps the previous rendered price difference. This is the code for the price difference
{% if variant.compare_at_price > 0 %}
{% assign price_difference = variant.compare_at_price | minus: variant.price %}
κερδίζετε {{ price_difference | money }}
sale-price { white-space: break-spaces !important; }{%- endif -%}
I’ve also tried to put it out of
and then out of but it didn’t change much. I’ve also tried to refresh the span with JavaScript whenever there was a change in the URL (when I click other sizes) and I also tried calling it with “render” and “capture”. Any ideas? Thank you in advance.