Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Show all Affiliate statistics regardless of payout - Affiliate view Rate Topic   - - - - -

 
  • jagorny
  • Senior Member
  • Members
  • Join Date: 29-Nov 08
  • 226 posts

Posted 24 February 2010 - 05:09 PM #1

If you use the affiliate module, you likely already know that when an affiliate logs into their account, the only statistics available to them are the ones that your plan agrees to pay them for.

For example, if you don't offer commission for banner shows, banner clicks, or new referral customers, the affiliate will not see these statistics, or the valuable calculations that are included in those. This makes it very difficult for your affiliates to know whether their banner placement, especially product banner placement, is working well.

If you would like to modify the cart so that all affiliate statistics visible from the admin side of the affiliate commissions module (with zero items set to show) show up when an affiliate views their commissions > general statistics - it is a quick fix.

In addons/affiliate/controllers/customer/aff_statistics.php, make the following change around line 100:

	}
	if (!empty($statistic_search_data['zero_actions']) && $statistic_search_data['zero_actions'] == 'Y' && AREA != 'C') {
		$statistic_conditions .= " AND (amount = 0) ";
	} elseif (empty($statistic_search_data['zero_actions']) || AREA == 'C') {
		$statistic_conditions .= [COLOR="Red"]" ";// AND (amount != 0) ";[/COLOR]
	}

Now when your affiliate logs in, they will be able to see all of the statistics for their referral traffic, including those that do not pay out.
Jacob Gorny

www.orthodoxmarketplace.com - CS-Cart 2.2.4 Pro (Dedicated)

 
  • bb3
  • Member
  • Members
  • Join Date: 11-Nov 10
  • 78 posts

Posted 02 December 2012 - 02:03 AM #2

I tried this on 2.2.4 but I received this error. Any suggestions on how to fix it?

Parse error: syntax error, unexpected '[' in on line 108

 
  • Entangled
  • Advanced Member
  • Members
  • Join Date: 10-Oct 11
  • 60 posts

Posted 04 February 2013 - 02:21 PM #3

Isn't this a basic need?

Why isn't this "fix" in 3.x?

 
  • Wilko
  • Advanced Member
  • Members
  • Join Date: 14-Feb 13
  • 102 posts

Posted 26 September 2013 - 01:30 PM #4

Just an update (Version 3.05 in use):

"In addons/affiliate/controllers/customer/aff_statistics.php, make the following change around line 100:"

} elseif (empty($statistic_search_data['zero_actions']) || AREA == 'C') {
  //$statistic_conditions .= " AND (amount != 0) "; //  This is original line commented out but left in for reversion!
  $statistic_conditions .= " AND (amount >= 0) ";  //  This is edited code to show ALL statistics - you can delete the AND (amount >=0) entirely between the "" quotes

An additional issue is that even with the original code in place - the search function on the Aff Stats page returns a 404 error anyway...