Affiliate
v1.5.6

Email Notification Templates

Our extension encourages the sending of email notifications on each key action that an affiliate can perform. You can see their list on Email Notification Settings subsection at Marketing -> Affiliates -> Settings.

Each notification can be sent using its template. It is a standard Magento Transactional Email that can be customized using the default Magento means.

Our extension also adds a set of special variables to the templates that turn emails into flexible notifications.

How to customize Email Notification

image

If you wish to customize one of the Affiliate Email Notification, please do the following:

  • Go to Marketing -> Email Templates and press the Add New Template button. You will be brought to the Template creation page.
  • Use the Template drop-down field to select one of the default Affiliate templates as a base - they are located under the Mirasvit_Affiliate section.

    Note

    If you wish to customize the notification for a new account creation - you will realize that our extension provides two different templates with the same name - New Account. The first one is the email notification for admin staff and the second is for the affiliate.
  • Press the Load Template button to automatically fill in the Template Subject and the Template Content fields with default content. Modify them to fit your needs.
  • Give the template a new Template Name and save the template. From this moment on, it becomes selectable in the configuration section.
  • Go to Marketing -> Affiliates -> Settings -> Email Notification Settings, pick up the proper event, assign it to your newlycreated template, and save the configuration.

Notification Email Variables

Our extension also provides customers with a list of special variables which can be used for email customizing.

Here is the list of the most used variables (some of them, however, can be used only in specific notifications):

  • {{var account.getName()}} - name of the current Affiliate
  • {{var account.getEmail()}} - email of the current Affiliate
  • {{var account.getPaymentEmail()}} - emails on financial returns, used by the Affiliate for payments.
  • {{var account.getWebsite()}} - referring website of the current Affiliate
  • {{var account.getBalance()}} - balance of the current Affiliate. Shorcut {{var balance}} can also be used.
  • {{var account.getTotalCommissions()}} - total quantity of all commissions, received by the Affiliate.
  • {{var account.getTotalWithdrawals()}} - total quantity of all withdrawals, made by the Affiliate.
  • {{var account.getIsSubscribed()}} - returns true or false, with the question of whether the account has a subscription.
  • {{var status}} - shortcut for account status of current Affiliate (available only in notifications for New Account)
  • {{var isPending}} - shortcut, which returns true or false, depending on a Pending status of the Affiliate account. Typically used in {{if isPending}} conditionals and available only in the notifications for New Account.
  • {var transaction.getAmount()} - amount of the current Affiliate transaction. Shortcut {{var amount}} also can be used.
  • {var transaction.getMessage()} - message which contains details of the transaction (commission or withdraw).
  • {{var withdraw.getAmount()}} - amount of current withdrawal action, requested by the Affiliate
  • {{var withdraw.getMessage()}} - message which contains details of Withdrawals requested by Affiliate

Example

You can also use variables in some complex expressions, using a special {{trans}} variable, which is equal to the sprintf function, and allows PHP-like expressions:

{{trans "Greetings, %name," name=$account.getName()}}