Closed (fixed)
Project:
Ubercart Discount Coupons
Version:
5.x-1.7
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2009 at 01:37 UTC
Updated:
14 May 2009 at 21:40 UTC
Hi,
I think this is a problem where a coupon is used that is larger that the order total. For example:
Coupon Code: couponcode1
Expiry Date: Jun 30 2009
Active: Yes
Discount Type: Price
Discount Value: 20
Minimum Order Limit: 0
Maximum number of redemptions: 1
If my order total is 15 before applying couponcode1, the order total would be -5.00 upon applying the code. I think this must be 0.00 because if this is negative, in reality, the store owner would have a 5.00 credit to the customer.
Can anyone help me with this? Thanks!
Comments
Comment #1
peps commentedNevermind, found this code:
Line: 514, uc_coupon.module
$coupon_result->amount = $coupon_data->value;Replace with:
$coupon_result->amount = ($cart_total - $coupon_data->value >= 0) ? $coupon_data->value : $cart_total;Comment #2
longwaveThis should be fixed in the -dev release, which I'm about to push out as 5.x-1.8.