Sometimes I get a purchaser and the order log contains this note:

Removed commission recorded for affiliate uid

I'm wondering what does this mean? Under what conditions does this appear in an order? It does not appear in every order. Does this mean, perhaps, that the cookie that would have attributed the order to someone has expired?

I've copied the code below but I am not a coder and thus I don't know how to translate it.

Dan

// take commissions ( moving from a "give commissions" status to a one that doesn't have that privillege)
if($op == 'update' && $statuses[$order->order_status] && $status && !$statuses[$status]) {
$result = db_query("SELECT aid FROM {uc_affiliate2_commission} WHERE order_id = %d", $order->order_id);
$affiliate = db_fetch_array($result);

db_query("DELETE FROM {uc_affiliate2_commission} WHERE order_id = %d", $order->order_id);

$note = t('Removed commission recorded for affiliate uid: @affiliate', array('@affiliate' => $affiliate['aid']));
uc_order_comment_save($order->order_id, $user->uid, $note);
}

Comments

royerd’s picture

any thoughts on this question?

bojanz’s picture

Some order statuses are "award" statuses. This means that for them the commission is attached, and they are set in the affiliate settings.

When changing from an "award" status to a regular status, the commission is removed.

There was a bug there that caused the module to try and remove the commission even when it's not there ( when the order has no affiliates), but that's fixed in CVS now.

bojanz’s picture

Status: Active » Closed (fixed)