I need uc_affiliate to work with uc_coupon and uc_free_order.

uc_coupon gives you discount on the order total sum. That didn't play well with the current implementation in uc_affiliat2.

I added two settings on the settings page.

1. Enable order total commission handling
Will process $order->line_items (subtotal & coupon) and instead of $order->products.

2. Disable commission for these Payment methods
I also added a setting to disable commission from certain payment methods. In my case uc_free_order.

CommentFileSizeAuthor
uc_affiliate2-6.x-2.0-new.patch3.67 KBfreakalis

Comments

bojanz’s picture

Will look into it in the next 48h, as soon as I'm done with the PostgreSQL work.

BenK’s picture

+1 for this feature. I really need this too.

bojanz’s picture

I will be working on the module again in the next 7 days, things have been hectic at work so the last thing I want to do after 10h of programming is: more programming :)

bearstar’s picture

I will be following your progress, thanks!

LightFromArt’s picture

I need this too. Is uc_affiliate2-6.x-2.0-new.patch working? Did anybody try it?
Bojanz, did you try it? Thank you in advance.

bearstar’s picture

I am pretty sure I tried this patch and it seems to be working fine.

LightFromArt’s picture

Thank you it works for me too.

titi88888888’s picture

Hello.

PROBLEM
I can't get this patch working on my Drupal 6.13 with Ubercart 2.0 FINAL RELEASE (21oct) ?

The first function simply make the affiliate not having any commission AT ALL. Then no one get commission either the order is $1000 or $0 !

The second function simply doesn't work. If the payment method "check" or "free order" is checked to not giving commission, the affiliate still have the commission. It simply chages nothing.

I don't know what is the problem here. I have to admit I am a bit lost.

- Could it be because my drupal is in a subfolder ? "www.mysite.com/drupal"
- Could it be that I am running the Ubercart2 final Release ? which release did you use ?

If you had an idea, I would really appreciate your help.

Thank you

bojanz’s picture

Status: Needs review » Fixed

How does this play with: http://drupal.org/node/630152?

Looks like uc_coupon needs to implent hook_uc_price_handler, like uc_discount does. (Confirmed this on the Ubercart forums)

I've commited the payment methods part of the patch, which means we work with uc_free_order in the mix.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.