Closed (fixed)
Project:
Ubercart Affiliate v2
Version:
5.x-2.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2009 at 09:50 UTC
Updated:
27 Mar 2010 at 21:02 UTC
I think the commission needs to be based on the order subtotal not the total. If you have delivery charges for example on an order, the affiliate should not get a commission on this. There may be other modules and instances where this may be the case as well!
Thanks
Will
Drupal Developer
http://www.williameaton.co.uk
Comments
Comment #1
bojanz commentedI think this problem is fixed by http://drupal.org/node/630152 (uc_price() should do the trick).
Let me know if this is not the case.
Comment #2
lonehorseend commentedIt's fixed sort of. The patch mentioned in the link above does work to isolate the subtotal. However, it doesn't take into consideration discount / coupon modules, so the affiliate is getting paid the commission on the full product price and not the discounted price.
Comment #3
bojanz commentedThe bug is in the discount modul, which doesn't implement the hooks required for uc_price (which is the prefered way of modifying prices) to work.
Comment #4
lonehorseend commenteduc_coupon, uc_fees, and uc_discount_alt all do things differently and do not implement the uc_price hooks. They end up being line items after the subtotal is calculated. So I looked at the uc_order_line_items table and modified the results from this patch that way to calculate commissions without discounts and having fees commissioned. Normally fees would be treated like taxes (no commission), but, in my particular project, I needed the fees to have a commission. If you want I can post my solution here.
Comment #5
bojanz commentedPost it, of course.
Comment #6
lonehorseend commentedActually, I was wrong. Uc_coupon is okay with this patch. It's uc_fees and uc_discounts_alt only. I'll post the uc_discounts_alt code after I finish up with my project.
Comment #7
bojanz commented