Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi all,
I'd like to apply discounts to line items compare prices at checkout with the following conditions, but unsure how to approach the problem.
If there is a percentage discount code applied to the cart I'd like to apply that discount to the compare price and not the sale price if the discounted compare price is less than the current sale price otherwise it should not be discounted at all.
To better illustrate the behavior I'd like to achieve, consider I've got the following input cart:
CP: Compare Price
P: Current Sale Price
Discount Code: 50%
Line Items:
1. itemA P: $40 CP: $100
2. itemB P: $60 CP: $100
3. itemC P: $100 CP: 0
I need my output cart to be:
1. itemA $40 $100
2. itemB $50 $100
3. itemC $50 $100If anyone has some insights regarding this, I would greatly appreciate if you could provide some assistance 🙂
Did you find a way to do it? I'm having the same problem.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024