Sale discount
Apply a percentage discount once, then multiply the reduced price by the number of items. The sample uses a $80 item with a 25% discount.
| @1 | originalPrice = 80$ | |
| @2 | discount = 25% | |
| @3 | salePrice = originalPrice * (1 - discount) | |
| @4 | quantity = 3 | |
| @5 | orderTotal = salePrice * quantity |
How it works
- Change
originalPriceanddiscountto match the offer. - Set
quantityto the number of items in the basket. - Use
orderTotalas the discounted subtotal before shipping or tax.
Keep taxes and delivery as separate named lines when you need the full checkout total.