Coupon not sent if other items in order
-
Hi,
I have discovered what seems to be a bug in PDF Coupons.
If I set the coupons to be automatically generated and sent on Processing and then create an order a non-coupon item and a coupon then the coupon is not generated and sent. Note the order is important.
If I create an order with just a coupon, then the coupon is sent as expected.
The problem seems to be in the function CouponsProcessing::generate_coupons_for_order_items()
It iterates over the items in the order and if the item is for a coupon then it creates it.
However if the item is not a coupon then it throws an exception. This means that the iteration stops at this point, and any further items are not inspected. So if the coupon is not the first item in the order it is not processed.
Thanks,
Simon.
- The topic ‘Coupon not sent if other items in order’ is closed to new replies.