When adding more products to the cart the "granted amount" is wrong. It is correct on the calculation, so the amount needed to be paid is correct, but wrong in the button of the page. See attached screenshots.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | coupon_granted_amount-1676272-4.patch | 1.31 KB | pcambra |
| #2 | coupon_granted_amount-1676272-2.patch | 1.99 KB | jonathan_hunt |
| Screenshot-4.png | 74 KB | lsolesen | |
| Screenshot-3.png | 77.68 KB | lsolesen |
Comments
Comment #1
brunorios1 commentedi can confirm this bug...
the granted amount isn't updated if the cart value is changed after the coupon was used.
Comment #2
jonathan_hunt commentedI can confirm this issue. Attached is a patch that rewrites commerce_coupon_pct_commerce_coupon_granted_amount_alter(). The current version tries to calculate the amount for a coupon redemption based on order line items but I can't see that there is any way to incorporate the line item quantity so the value is incorrect. The attached patch simply reuses the coupon total from the commerce order total.
I'm not sure if this is the best way forward but it seems to work for me.
Comment #3
brunorios1 commentedworked here!
thanks!
Comment #4
pcambraI can't reproduce the problem. Anyways I like the spirit of the patch which is lighter.
Could you guys test this version? works for me.
Comment #5
jonathan_hunt commentedDid you ensure you had quantity > 1 for the product line item?
Anyway, your patch works for me.
Comment #6
pcambraCommitted, thanks guys!