Before I begin, let me start off saying I appreciate the incredible flexibility offered by this module.
About 2 months ago, I rebuilt my main website to use Ubercart and this affiliate module. Since affiliate referrals form a major portion of my site traffic, this is HIGHLY important for me. I do admit I did little testing, and I should have discovered the problems earlier.
Today, as I checked the reports to see how much to pay my affiliates, I noticed some strange numbers. One affiliate was reported as earning more commissions than the sale he generated.
In checking this out, I realized that the commission amounts were calculated against each order's subtotal and not the discounted total the customer actually paid.
I realize there may be some issues to avoid paying commissions on taxes, shipping, and things like that, but there should (almost) never be a case when an affiliate is paid more than they bring in.
I also found another problem, which I will post as a separate issue. (Role-based commissions not being applied.)
What can we do to ensure that commissions are calculated against a discounted subtotal (after discounts, before taxes and shipping)?
Thanks.
Comments
Comment #1
bojanz commentedThis comes up every once in a while.
This module uses the ubercart price hooks in calculating the total. The discount modul avoids the price hooks, hence its changes get ignored by other modules.
I'm not really sure what I can do to make this easier / better. Open to suggestions & patches. Perhaps discussing this on the discount module issue queue first would be good.
Comment #2
AlanT commentedI appreciate your response, bojanz. And I certainly recognize the complications involved, especially when some sites may implement product-specific commissions and others do not, and how some discounts may be product-specific, while others are not.
Perhaps the thing to do is to get the developers of both modules together to work out an agreement as to how the 2 can work together.
Comment #3
sakthiprogrammer commentedwe also face the same issue. Any quick resolution is appreciated.
Comment #4
ar-jan commentedIt looks like this was fixed in #630152: affiliate payment excludes VAT / taxes. It seems to be working for me with 2.6 and uc_discount.