Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 05-28-2012 06:13:49

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Affiliate earns commission on own account/email address.

Where is the code that prevents an affiliate earning commission on purchases made whilst logged into the affilate account??

It seems pointless as the affiliate would just use a different email address to order.

Thanks
Rob


Rob

Offline

 

#2 07-05-2012 09:54:05

jj1987
Member
From: Orlando, FL
Registered: 07-14-2008
Posts: 502
Website

Re: Affiliate earns commission on own account/email address.

Commission is calculated in the 0200_affiliate.php file.

Code:

// +--
// | Don't do commissions if our user belongs to a group other
// | than the 'users' group.
// +--

$info = $this->CORE_Session->user_getinfo($order['order']['email'],'usergroup');

if (!(empty($info['usergroup']))) {$usergroup = $info['usergroup'];} else {$usergroup = 'users';}

if ($this->debug) {$this->debugger("getcommamt: Determined customer's user group is '{$usergroup}'.");}

if ($usergroup != 'users') {

     if ($this->debug) {$this->debugger("getcommamt: Customer is not in the user group 'users'.  Commission set to zero.");}

     return array();

} // End of if statement.

You should be able to comment out the return array line like this-
// return array();



-James Garrett

Offline

 

Board footer