AffiliatorVersion 1.18

Buy Now

Affiliator lets you generate and track affiliate links, manage affiliates and pay commissions on purchases made through CartThrob and/or Brilliant Retail. You can set individual commission levels per affiliate id. You can set multiple affiliate IDs per member, and membership is not required to be an affiliate. If an affiliate is a member, the member account will be tied to the affiliate ID and the affiliate settings in the backend will allow you direct access to the member information.

Affiliator allows you to handle all affiliate operations on the backend, but gives you tags to handle most of these operations in standard templates as well. Operations like creating and updating affiliates generating affiliate links can all be done in front end templates, so that you can build an affiliate portal to suit your needs.

Requirements

Installation

Upgrading

Settings

Affiliator Settings Screenshot

Affiliator Settings Screenshot

Backend Settings

There are several pages of settings. Most are fairly self explanatory, but they're covered here briefly

Instructions Form Email Content

When an affiliate requests an email with their affiliate link, this is the content they will receive

PayPal Settings

Payments can be sent to affiliates based on their referral bonuses. When PayPal account information is added, it simplifies the commission payment process.

New Affiliate and Admin Notifications

These settings panes control the email content that is sent to an Admin or a New Affiliate upon signup. You can use standard EE template code in these templates, along with custom variables (listed in the settings). You can also embed EE templates ({embed="your_template_group/your_template"}).

Affiliates

This lists the affiliates currently registered to your site. The following pieces of information are listed:

Add Affiliate

Allows you to create an affiliate. Affiliates can also be created in EE templates. If you don't allow affiliates to self register, then you'll need to add them manually here.

Conversions

Orders that have been completed and the relevant commission for that order. This page lists:

Payments

This page lists payments that have been processed using the "Pay" link on the affiliates page. This page shows:

CartThrob Settings

If CartThrob is installed, Affiliator will list additional settings for it.

BrilliantRetail Settings

If BrilliantRetail is installed, Affiliator will list additional settings for it.

Tags

Affiliates

Generates a list of affiliates.

Parameters

Variables

Example

This will list all affiliates and their link

{exp:affiliator:affiliates}
    {affiliate_id} 
    {affiliate_member_id}
    {status}
    {commission}
    {hits}
    {if no_results}
        none
    {/if}

    Affiliate link tag: {exp:affiliator:link affiliate_id="{affiliate_id}" page="/"  }

{/exp:affiliator:affiliates}

This will list affiliate data for the currently logged in user

{exp:affiliator:affiliates
    member_id="CURRENT_USER"
    }
    {affiliate_id}
    {affiliate_member_id}
    {status}
    {commission}
    {hits}
    {if no_results}
        none
    {/if}

    Affiliate link tag: {exp:affiliator:link affiliate_id="{affiliate_id}" page="/"  }

{/exp:affiliator:affiliates}

Create Affiliate Form

This tag generates a form used to create an affiliate in a template.

Parameters

All of these parameters are also form inputs

Form Inputs

<input type="text" name="id" value="" />

<input type="text" name="paypal_id" value="" />

<input type="text" name="percentage" value="10" />

<input type="text" name="status" value="closed" />

Example

{exp:affiliator:create_affiliate_form}
    Affiliate Id: <input type="text" name="affiliate_id" value="" /><br /> 
    Paypal ID <input type="text" name="paypal_id" value="" /> <br /> 
    Percentage <input type="text" name="percentage" value="10" /> <br /> 
    Status <input type="text" name="status" value="closed" /> 

    <input type="submit" /> 
{/exp:affiliator:create_affiliate_form}

Update Affiliate Form

This allows you to update your affiliates in member templates, or allows them to update their own affiliate information

Parameters

All of these parameters are also form inputs

Form Inputs

<input type="text" name="status" value="closed" />

<input type="text" name="paypal_id" value="test@test.com" />

Example

{exp:affiliator:affiliates limit="2"}
    {exp:affiliator:update_affiliate_form }
        <input type="text" name="affiliate_id" value="{affiliate_id}" /> 
        <input type="text" name="status" value="{status}" /> 

        <input type="submit" /> 
    {/exp:affiliator:update_affiliate_form}
{/exp:affiliator:affiliates}

Status List

Lists any statuses that have been created. Statuses is an arbitrary category that you can apply to an affiliate. The have no affect on the system and are purely informational

Variables

Example

{exp:affiliator:status_list}
    {status}
{/exp:affiliator:status_list}

Payments

Lists payments that have been made.

Parameters

Variables

Example

{exp:affiliator:payments}
    {affiliate_id} 
    {affiliate_member_id}
    {payment}
    {id}
    {date format="%Y %m %d %h"}
    {human_date}
    {transaction_id}

     {if no_results}
    none
    {/if}
{/exp:affiliator:payments}

Current Affiliate

Outputs data about the current registered affiliate (based on affiliate id set in users cookie). You would use this tag to display affiliate information to a customer that clicked on the affiliates link. To display information to the affiliate themselves, use the affiliates tag.

Variables

Example

{exp:affiliator:current_affiliate}
    {affiliate_id} 
    {affiliate_member_id}
    {affiliate_email}
    {percentage}
    {commission}
    {status}

     {if no_results}
        an affiliate is not currently set
    {/if}
{/exp:affiliator:current_affiliate}

Email Instructions Form

This will generate a form used to send a pre-formatted email to a specified email address. You create the content of this email in the backend settings, to combat spam, it is not editable in the template output. You can always use EE's send to a friend form or alternate method if you want the affiliate to have control over the message content.

Parameters

Variables

Form Inputs

You can use your own input fields rather than the form_fields variable if you'd prefer

<input type="text" name="email_to" value="" />

<input type="text" name="email_to_name" value="" />

<input type="text" name="email_from" value="" />

<input type="text" name="email_from_name" value="" />

Example

<p>Need to send the link to someone else? Enter their email address and hit submit.</p>
 {exp:affiliator:email_instructions_form affiliate_id=""}
    {form_fields}
{/exp:affiliator:email_instructions_form}

Generates an affiliate link

Parameters

Example

<p>Copy the code below, and add it to your website to generate commissions by referring traffic to this site.</p>
<p>
<textarea name="affiliate_link"  rows="3" cols="100" id="affiliate_link">
<a href='{exp:affiliator:link affiliate_id="" page="my_group/my_template"  }'>Click here to visit: {site_url}</a>
</textarea>
</p>

Hits

Outputs the number of hits the current affiliate has registered

Parameters

Example

{exp:affiliator:hits affiliate_id="some_id"}

Trigger

Triggers a commission. Be very careful with this tag, as this will register a commission every time this tag is parsed in a template. This can be a useful tool when affiliator is used for basic tracking, but if you intend to capture money commissions based on some user interaction, a custom extension that calls Affiliator's calculate_commission function will be much more secure.

Parameters

Example

This will list all affiliates and their link

{exp:affiliator:trigger total="10" order_id=""}
    The content set between these tags will be used as the email message.
{/exp:affiliator:trigger}

Global Form Parameters

HTML parameters

id

CSS id of your form. This is an arbitrary value.

id="myform"

class

CSS class of your form. This is an arbitrary value.

class="my_form_class"

name

The name of your form. This is an arbitrary value.

name="my_form_name"

onsubmit

Optional javascript function to run once the form is submitted.

onsubmit="your_custom_javascript()"

variable_prefix

Allows you to add a prefix to all variables within the tag to avoid variable collisions with another tag.

variable_prefix="my_var"

This is an example of how you could then call the entry_id variable within the tag.

my_var_entry_id

Form submission parameters

secure_action

If set to "yes" the form will be submitted via https://

secure_action="yes"

return

This is the URL you'd like the site redirected to when the operation is complete. If left blank, the page will not redirect.

return="cart/view_cart"

secure_return

If set to "yes" the form will redirect to the https:// version of your return url after form submission.

secure_return="yes"

Troubleshooting

PayPal MassPay Edition

Affiliator is available as the standard edition, and the MassPay edition. If you have many affiliates that you need to pay referral bonuses to on a regular basis, you should purchase the MassPay Edition of Affiliator. This version provides additional automation options for paying commissions to Affiliates. When MassPay edition is installed, you will see additional buttons that say "Pay open commissions with PayPal MassPay" in several of the backend settings. When you click this button, PayPal MassPay will be used to pay any outstanding commissions to all affiliates.

Affiliator (MassPay) can be installed over the top of standard Affiliator. All settings and databases are the same from one edition to the next. The MassPay version can also be replaced by the standard version if need be.

Before you can begin using MassPay, you must sign up for MassPay at PayPal. MassPay is not available in all areas.

Developers

Included with Affiliator is a plugin that can be used as a model to tie your app in with Affiliator. Basically what's needed is:

  1. Load in the Affiliator Extension Code
  2. Instantiate that extension
  3. Call the calculate_commission function of the extension to register a commission with your app.

Top of Page