Hi,
Is there a way to get discounts applied on the cart in discount functions? I see all these values do not consider the line level discount already applied.
type CartLineCost {
“”"
The amount of the merchandise line.
“”"
amountPerQuantity: MoneyV2!
“”"
The compare at amount of the merchandise line.
“”"
compareAtAmountPerQuantity: MoneyV2
“”"
The cost of the merchandise line before line-level discounts.
“”"
subtotalAmount: MoneyV2!
“”"
The total cost of the merchandise line.
“”"
totalAmount: MoneyV2!
}
Nope. All discount functions run in parallel.
- You can use order discount ‘conditions’ to apply order discount values ‘after product discounts’.
- You can access totals/subtotals as expected (i.e after product and order discounts) in shipping discount functions.
- You can use a discount allocator to have full knowledge of what discounts have a applied. Currently dev preview + only available for private custom apps for plus stores.
- You can use the ‘fetch’ target to grab a list entered discount codes. This is only for enterprise custom apps (I believe).
Hope that helps
Thanks for this detailed answer
The discounts in this screenshot are product-level (aka cart line-level, I’m assuming that’s the same thing) discounts created with Discount Kit. They are both 10% with the second being clearly applying after the first. What do we konw about this priority logic?
Hey @Si_Hobbs - don’t know for sure, but from trial and error it appears:
percentage based is applied before fixedAmount based
- The
higher economic value is applied first.
@bkspace thanks and good to see you here 