I have a discount based on product type and role that is applying correctly (although only in the mode where the discounts show during checkout, not before which is what I would like). The problem is that the discount amount is overriding the total creating a negative amount in the order total preview pane and creating problems for shipping and checkout (for obvious reasons, and there are errors).
Any fixes for this?
Here is what I get on the checkout page from an order for $20 with a 20% discount (i.e $4) applied:
Select a payment method from the following options.
Order total preview: Discounts: -$4.00
Order total: -$4.00
I should have
order total preview: Discounts -$4.00
Order total: $16.00
Comment | File | Size | Author |
---|---|---|---|
#2 | uc_discounts_5xdev_fixgettax.patch | 553 bytes | Chad_Dupuis |
Comments
Comment #1
Chad_Dupuis CreditAttribution: Chad_Dupuis commentedI believe I fixed this by looking at a patch that made it into the 6.x branch that never got into the 5.x branch involving a call to getTax - if taxes are not applicable or you don't have it enabled at all the whole total price function fails. Correct the lines in uc_discounts.module around line 336 made everything work for me....... I'll try to write a patch and get it submitted, but for now you can change the code to match the following:
Comment #2
Chad_Dupuis CreditAttribution: Chad_Dupuis commentedI've included the patch for this fix.