I’m trying to implement “You save % ($)” message, however, I run into a little issue with products that have variables - the savings would not update on variant change. This I believe is due to missing JS as it’s an added feature that’s not within the original Debut theme.
I have tested these 2 versions:
This version works fine with products with no variants, however, it obviously doesn’t work with different variants.
Wow, you’re a superstar! Thanks so much mate, it works like a charm.
Just one little thing I’d like to add - I have a feature coded in which requires users to select a variant before they can add it to cart (until then ATC is disabled). So the code you provided works like a charm once the variant is selected, however, it says “You Save: 0% ($0)” before customer selects a variant. Could you modify it slightly so that before the variant is selected, it either says “You Save: Pick an option to see” or it simply displays savings of the first available variant? Currently, before the variant is selected, the price of the first available variant is also displayed and then it changes once user makes a choice.
I’d rather not share the link on a public domain, I hope you understand. But you seem to understand exactly what I need, so I don’t think there will be any issues.