Active
Project:
Ubercart Discounts (Alternative)
Version:
6.x-2.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jun 2009 at 17:25 UTC
Updated:
22 Dec 2011 at 08:20 UTC
Currently if users apply a discount(s) that covers more than the total amount it gives the user a negative balance for their order total. This makes for screwy credit card transactions and it causes the gross revenue to be misrepresented in the reports. Can we have the discount module go no lower than $0 total?
Comments
Comment #1
ryangroe commentedSounds like a good idea. I will make that change tonight. Each discount will apply only up to the remain subtotal and not more.
Comment #2
jrust commentedCool, I think the only thing that might be tricky is that the discount will need to be re-calculated when the subtotal changes (i.e. because the user changes shipping selection), but hopefully that's a javascript hook that ubercart has built in.
Comment #3
ryangroe commentedI don't know if this module this attempt to check shipping costs on the checkout page. It will probably check on the review page only.
Comment #4
ryangroe commentedI got about half done with this today. I am adding a module-level config value that will allow people to choose how discounts will max out.
Comment #5
guybedford commentedDid this ever get fixed? I see the negative total on the order checkout page, and am not sure if this is going to mess up our payment process?
Comment #6
landylan commentedIn order to avoid "discounts more than 100%" for each product, could we just add a variable ($order_product_id_total_discount_amount_map, for example) in the begining of function get_discount_for_order(), to record the total discount amount of each product and check later if there's product got discount more than 100%? the variable $total_discount_amount do the simular jobs. I know that some discounts was for entire order, but we can take the average and put it into each product...
I think it will work for all kinds of discount type....
Comment #7
robbertnl commentedStill not fixed. Negative balances do occur or am i missing something?
Did anybody made a patch/fix for this?