Script for Installments not updating with variant price

Highlighted
New Member
2 0 0

Hello Dears,

I'm using a script to show the price of the product as installments (very common here in Brazil) and it works fine for products that has no variants or has variants with the same price.

The problem is when the variant has a different price. The installments value does not update according to the new variant price. Please check image below for a better understanding.

On the left there is the first variant, the "small" version of the product. The installments are ok.

On the right we have the "medium" size variant with a different price. The installments are the same to the "small" version, which is wrong.

variant small.PNGvariant medium.PNG

The script I'm using is this below. I thought that if I change the "product.price" to "variant.price" it would fix the problem, but then value on the installment goes to R$0.00.

installments.PNG

Does anyone know how can I edit this script to show the installments according to the variant price?

Note: This script is being used on Sections, product-template.liquid

Thanks a lot!

Carlos

0 Likes
Highlighted
Shopify Partner
452 59 71

@CarlosczSilva 

Could you please share the URL so that we can look at it to find any obvious issue in the script?

 

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution

Skype : lokendra.panwar1
0 Likes
Highlighted
New Member
2 0 0