The conditional action code is looking for the cart's current coupon in:
$order->data['coupon']
I think this is now stored in the session as the value does not appear to be available in the order object.
As a result the conditional action is not responding correctly to the current coupon condition.
Assuming I am right in this assumption, I have attached a patch to change the uc_coupon_condition_order_has_coupon function.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | uc_coupon.ca_.inc_.patch | 816 bytes | ikos |
| uc_coupon.ca_.inc_.patch | 804 bytes | ikos |
Comments
Comment #1
ikos commentedRevised version of my patch attached. Although it worked, it did not change the case of the coupon code before checking.
Comment #2
wodenx commentedThis patch will only work if the condition is invoked in the same session in which the coupon was applied - i.e. not when orders are updated after the fact (by IPN, for example).
The coupon is inserted into the $order object when it is validated. At what stage in the order process (i.e. through what trigger) are you invoking this condition?
Comment #3
wodenx commentedConnected to #276498: Discount on (or free) shipping?. The $order object will not contain the currently applied coupon until after the checkout page is submitted - thus it will not be available for any checkout pane ajax callbacks. Will try to implement the fix suggested by longwave at #31 of the referenced thread.
Comment #4
wodenx commentedPlease see #276498: Discount on (or free) shipping? for a patch which should resolve this issue properly.
Comment #5
wodenx commented