How to change aff_link.html

Discussion in 'Templates customization' started by benfitts, Feb 24, 2009.

  1. benfitts

    benfitts Member

    Joined:
    Apr 10, 2008
    Messages:
    111
    Hi all,

    One common question that comes up from affiliates is what is their affiliate id, or what is their direct link.

    There's no way to do this with amember. Right now the only way to make affiliate links is to setup a link to a specific page and I have to specify the text. I can look at it and pick out the affiliate id and the page id but some of my users are novices.

    What I want to do is edit aff_link.html so that I can have a section at the top of the affiliate links that says:

    Your Affiliate ID is: {$aff_id}
    Your Basic Link Code is: http://www.mydomain.com/amember/go.php?r={$aff_id}

    I've tried a few things but haven't figure out how to do it? This should be pretty simple, right? What am I doing wrong?
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    The affiliate ID is their user id : {$user.member_id}

    David
  3. benfitts

    benfitts Member

    Joined:
    Apr 10, 2008
    Messages:
    111
    That array/variable must not be available to aff_links.html

    If I do something like:
    <strong>Your Affiliate ID is: {$user.member_id}</strong>

    It's just blank where I would expect the user's member_id to print out.
  4. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    OK, that code may be just for emails.
    Try these
    {$smarty.session.member_id}
    {$smarty.session._member_id}
    {$smarty.session._amember_user.id}
    {$smarty.session._amember_user.member_id}

    Please post back if one works.

    David
  5. benfitts

    benfitts Member

    Joined:
    Apr 10, 2008
    Messages:
    111
    Hi David,

    You're awesome. Thanks for the reply. The one that worked was the last and longest :)

    {$smarty.session._amember_user.member_id}

Share This Page