Custom a Payment Plan

New Member
3 0 0

Hello everybody, 

I added this code to divide the price per 3 and 4 to show payments plan in 3 times and 4 times 
I added the fact that the price need to be higher than 100 
If not payment plan is not available.


<p id="digital_text" >
              {% if current_variant.price >= 10000 %}
         <br>Payez en 3 x {{current_variant.price | divided_by: 3 | money }} 
         <br> ou Payez en 4 x {{current_variant.price | divided_by: 4 | money }}
         <br> Paiement CB sans frais<br>
         {% else %}
         Paiement en plusieurs fois non disponible pour cet article, merci d'ajouter des produits au panier (min 100€)
         {% endif %}


My problem is when I change the variant I need to refresh the page so it will recalculate the new payment plan
I Think i have to add something in theme.js but I m not good at Java.
Please if someone can help I would appreciate.

Thank you in advance