No Affiliate Links in User Account

6 replies [Last post]
howtobox
User offline. Last seen 17 weeks 4 days ago. Offline
Joined: 12/17/2009

Hi, purchased the module today and trying to get it setup.  I cannot find anywhere where the module tells the user what their affiliate link is.  On their user account pages, I get a tab for affiliates and referrals, and under their account settings, there is a field for them to enter their paypal address, but that's it. 

Looking at the module code, it appears that there are supposed to be another three text fields in their account settings page (for those that have the correct permission - act as affiliate) where they could define what some of their links could be. 

I do have the panels module installed which is overriding the regular drupal user page, but it shouldn't be affecting the account settings.

Any idea why I can't see these fields, or is there something else I need to do to in order for the module to tell my affiliates what their linking code is?

Thanks.

wildkatana
User offline. Last seen 3 hours 37 min ago. Offline
Joined: 06/03/2009
Howtobox, I think the problem

Howtobox,
I think the problem may be that you are trying to view other users' accounts. This only works if you are logged in as the user and are viewing the account. This is to stop other people from seeing the user's info.

Sincerely,
Leighton Whiting

howtobox
User offline. Last seen 17 weeks 4 days ago. Offline
Joined: 12/17/2009
Same Problem

I can confirm that if I create a user and then login as that user who has the "act as affiliate" permission, I still see no change to what I posted above.

howtobox
User offline. Last seen 17 weeks 4 days ago. Offline
Joined: 12/17/2009
Panels module

Issue is the panels module.  If I don't override the user profile with my custom panel page then the Affiliate panel shows up on the user profile as expected.  With panels, I have the ability to create a custom php block to include on the page.  I tried the following code:

<?php print ms_affiliates_view($account); ?>

and a few other variations, but they didn't work - any chance you could give me the correct snippet that will display the affiliate panel?  Thanks.

wildkatana
User offline. Last seen 3 hours 37 min ago. Offline
Joined: 06/03/2009
Howtobox, I haven't tested

Howtobox,
I haven't tested this, but you could try:


<?php
global $user;
$account = ms_affiliates_view($user);
print drupal_render($account->content);
?>

Sincerely,
Leighton Whiting

howtobox
User offline. Last seen 17 weeks 4 days ago. Offline
Joined: 12/17/2009
Resolved

Took a while, but trial and error and with your help, success has been achieved with:

<?php
global $user;
$account = user_load($user->uid);
ms_affiliates_view($account);
print drupal_render($account->content);
?>

Thanks.

wildkatana
User offline. Last seen 3 hours 37 min ago. Offline
Joined: 06/03/2009
Thanks for sharing how you

Thanks for sharing how you did it. I forgot the $account variable was passed by reference.

-Leighton