Two questions, either of which should lead to a solution.How is the order of coupon application determined?
When a coupon is being applied, and an applicable set of items in the cart are filtered, what determines the order of the items that the coupon is applied to?
If relevant, I am using the extension Smart Coupons by StoreApps to add some functionality, but the core of what I am doing is relying on the out of the box woocommerce coupon.
I have two coupons restricted to product categories discounting 100% of the covered items and covering set number of items a piece.
Coupons:
TOP-3 (Covers 100% of up to 3 items in category Tops)
THV-2 (Covers 100% of up to 2 items in categories Tops or HiVis)
Cart:
4 Tops
1 HiVis
The THV coupon is being applied to the Tops items first, leaving 1 item to be covered by the TOP coupon, and the HiVis item uncovered.
What determines the order in which coupons are applied to the cart, AND what determines the order in which the coupon is applied to the items it is applicable for?
The application order seems to change depending on the quantity of the items in the cart.
Examples:
COUPONS COVER ALL ITEMS
Cart:
3 Tops
2 HiVis
Cart:
2 Tops
2 HiVis
Cart:
1 Tops
2 HiVis
Cart:
1 Tops
1 HiVis
Cart:
2 Tops
1 HiVis
COUPONS DO NOT COVER ALL ITEMS
Cart:
3 Tops
1 HiVis
Cart:
4 Tops
1 HiVis
COUPONS APPLY IN DISADVANTAGEOUS ORDER (BC the HiVis items happen to be more expensive)
Cart:
5 Tops
2 HiVis
Through testing I am unable to determine what factors in to which items the coupon is applied to when there is more than one option available. Any insight as what factors into that order?
[ad_2]