I'm currently trying to diagnose an issue with uc_discounts and uc_taxes. I realize that uc_discounts is not actively being maintained, but am hoping to get a pointer in the right direction for where I might go to fix up the code for this particular issue.
I am using the version of uc_discounts posted on 01/07/08, which adds support for hook_line_item.
Here's the scenario:
I have some class-based discounts applied to the purchase of a product. The first time I go to the checkout page, and enter all the required information, the calculation for sales tax is correct.
When I submit to "review order", the tax calculation is incorrect, calculating on the Subtotal before the tax item is applied. This incorrect tax is also reflected in the uc_order_line_items table.
If I click 'Back', the data on the checkout page is correct, but the entry in uc_order_line_items is still wrong. When I click "review order" again, the information presented is now correct, and the uc_order_line_items table has the proper tax line in it.
So, I'm thinking there has to be some hook in uc_discounts that's not being triggered prior to uc_taxes being calculated the first time. The troublesome issue here is obviously that it is calculated correctly after the second submission to the "review order" page.
Is this a weighting issue? The data for the discount is in the uc_order_line_items table in all stages of the process, as a negative value, which is to be expected, but it seems that the first time the order is created, tax is being calculated prior to applying the discount.
Which hook/weight/etc. do I need to study to figure out how to fix this?
Thanks in advance...



Joined: 01/28/2008