I created an affiliate system following the documentation to the letter. At the end I had a system that could accurately track clicks from affiliate links but I am having issues with the tracking of the uplines and downlines.

I created an account for Joseph and went to another computer to use Joseph's affiliate link to refer Raphael. Now I have authenticated users on the site and then a role called 'affiliate' to which authenticated users apply to join as affiliates [i told u i followed d documentation]. Now when i created Raphael's account and I had not applied for Raphael to be an affiliate, I checked Joseph's affiliate center and found that Raphael did not appear in his downline. Now I went and made Raphael and affiliate and yet on Joseph's account, Raphael does not still show as a downline referral.

Only strangely that on Raphael's own affiliate center, himself appears as his own downline but Joseph does not still appear as his upline.

The core things I need on my site is to track clicks on affiliate links and to track their referrals. I want the referrals to track as they register on the site regardless of whether they join as affiliates or not.

Thanks if you could help.

CommentFileSizeAuthor
#2 downline_sql_fix.patch2.58 KBmmilano
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mmilano’s picture

I'm having the same issue.

I've confirmed that in the uc_affiliate2_users table, there is a record with the top level affiliate set as the aid, and the new affiliate I'm trying to setup as the uid.

When I go to the top level affiliate's download page, there is nobody listed.

When I go to the sub-affiliate's download page, the sub-affiliate is listed in his own downline.

I did notice the code that runs this page does have a TODO that it needed more testing and the query may not be 100%. I'm guessing this is the problem. I will post a patch if I can figure out the resolution.

reference: uc_affiliate2.user.inc uc_affiliate2_downline() around line 795

mmilano’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Status: Active » Needs review
FileSize
2.58 KB

This patch fixes the downline display addresses the comment to join the subquery so sorting on customers works.

nohup’s picture

Status: Needs review » Fixed

Thanks mmilano, patch works, committed to git.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

only corrected the spelling of Raphael