Display Referrals in Affiliate Area

Hi, I would like to be able to display all of the referrals that an affiliate has generated in their Affiliate Area. So when an affiliate logs in to the AA, they can see all of the names and statuses of their referrals.

Basically the same way I can see this info on the backend.

I did not see any shortcodes or other references to this in the documentation.

Thanks!
Andy


Comments

9 responses to “Display Referrals in Affiliate Area”

  1. George Avatar

    You are welcome Andrew!

    I have updated the plugin, please delete your current version and install the new one.
    After that, place the following filter in the functions.php file of your active theme, in order to show only the username for each referral.


    add_filter( 'affiliates_affiliate_stats_data', 'example_affiliates_affiliate_stats_data' );
    function example_affiliates_affiliate_stats_data( $data ) {
    foreach ( $data as $key ) {
    if ( $key['title'] == 'Username' ) {
    $modified_data[] = array (
    'title' => $key['title'],
    'domain'=> 'affiliates-domain',
    'value' => $key['value']
    );
    } else {
    $modified_data[] = array (
    'title' => '',
    'domain'=> '',
    'value' => ''
    );
    }
    }
    return $modified_data;
    }

    Regarding the post you should use the attribute: show_post=”false”

    Kind regards,
    George

  2. Andrew Avatar

    Great thanks!

    I’ve installed the plugin and got it working. I added more filters to the shortcode to hide the Currency, Amount and Post columns, but the Post column is still showing…

    [affiliates_affiliate_stats type="stats-referrals" show_pending="true" show_currency_id="false" show_amount="false" show_post_title="false"]

    Also, is there a way I can only show the referrals name? Right now it’s showing all of the info jumbled together.. “Name Joe BlowEmail marketing@joeblow.comPhone 666-666-6666US States AL”

  3. George Avatar

    Hi Andrew,

    I’ve prepared a custom filter for affiliates stats and sent it to the email address you used on checkout. Install it as a plugin and after enabling it use the shortcode [affiliates_affiliate_stats type="stats-referrals" show_pending="true"] in your affiliate area page.

    Hope this helps you.

    Cheers,
    George

  4. George Avatar

    Hi Andrew,

    I see what you mean and I will prepare a fix for this case.

    Cheers,
    George

  5. Andrew Avatar

    Hi George,

    I tried the shortcode but it did not display anything in the Details column? I’m only seeing the date, currency, and status

  6. George Avatar

    Hi Andrew,

    Please try this shortcode which renders details on your referrals.
    [affiliates_affiliate_stats type="stats-referrals" data="message" show_pending="true" /]

    Cheers,
    George

  7. George Avatar

    I see, I will modify the addon and let you know when it is ready.

    Cheers,
    George

  8. Andrew Avatar

    Hi George, thanks for the reply.

    Outside of minor editing, I am not very adept with PHP, so I really wouldn’t know where to begin with that addon. Do I add that code in the functions.php file?

    Thanks!

  9. George Avatar

    Hi Andrew,

    There is a free addon, affiliates-stats-filters-order-details, that provides you with the shortcode [affiliates_affiliate_stats type="stats-referrals"]. It renders details for referrals on orders but feel free to suggest modifications to the repository.
    If you are not familiar with PHP, please let me know.

    Kind regards,
    George

Share