Child pages
  • Refer a Friend - Magento 2

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.



General Configuration

The Configuration section is the first step to take when you start using the Refer a Friend extension. Please enter it following Stores > Configuration > Aheadworks Extensions > AHEADWORKS EXTENSIONS> Refer a Friend > Configuration.

The section consists of two blocks: General and Email Options. The General block makes it possible to set up general settings of the extension as follows below.

General Settings

Image RemovedGeneral SettingsImage Added

  • Who Can Invite Friends
This configuration option determines the customers
  • - determines customer groups eligible to act as brand advocates.
It allows you to avoid abuses of your refer-a-friend programs.
  • There two options you can choose between: a) All Registered Customers and b) Only Registered Customers with Previous Purchases. This way, only registered customers are allowed to invite friends. If the first option is selected, all the registered visitors with or without purchases may participate. The second option allows only customers with orders to enter the program. Additionally, you can determine the type of orders they should have to fit the requirements.
  • Order Status - flexibly manipulate with program accessibility for customers with particular order statuses. For example, you can make the program available for the customers who purchased physical products with the 'Processing' status (not yet shipped to them) and for those ones who purchased a virtual item, i.e. the products with the 'Complete' status.
  • Customer Groups Which Can Join Referral Program
  • - one more opportunity to shape and finalize the eligible circle of brand advocates is to select them among Magento customer groups. You can do this by using the Customer Groups Which Can Join Referral Program configuration option. This way, the groups that do not participate in the program are not distracted with unnecessary tabs in their customer accounts.

The selector doesn't contain the 'Not Logged In' group as it is unacceptable in any case.

  • Order Status to Give a Reward to Advocate
The Order Status to Give a Reward to Advocate option is useful, for example, in the case if you invoice orders outside of Magento but still want to award your brand advocates attracting new customers
  • - order statuses upon which advocates will receive rewards from the brought friends' purchases.
  • Holding period - define whether advocates should get earned rewards instantly or after a particular number of days (specified as a numerical value in this field). It's recommended implementing holding period in order to avoid situations when advocated may get rewards for subsequently canceled orders.

In case if '0' is set or the field is left empty, rewards will be given instantly once orders obtain the appropriate status.

  • Maximum RAF Discount Which Can Be Applied to Subtotal, %
  • - the most active brand advocates
  • can earn significant rewards and use them as discounts for their own purchases. So, you can limit its use during the checkout by providing the maximum discount allowed per one order.
  • If Unused, Earned Discount Expires in, days
  • - use this configuration option
in order
  • to motivate brand advocates to actively spend their rewards. The expiration date is calculated since the last positive balance update. Hence,
  • it is updated each time a brand advocate attracts a new customer.
  • Allow Applying Subsequent Discounts - in case you use other loyalty programs in your store together with the refer-a-friend program, discount application from several programs at once might negatively impact your profit margin. To avoid this, you can limit discount application by disallowing discounts other than refer-a-friend program-related.
  • Static Block for Welcome Popup
  • - if you want to facilitate the process of inviting new customers and allow brand advocates to show their attitude towards their friends, you can set up a welcome popup to be displayed for newly attracted visitors. The configuration option makes it possible to determine its content selecting among the Magento static blocks. The popup is not displayed if none of the static blocks are selected.

Send Email Reminder that the Balance Expires in X Days

If you set up expiration terms for brand advocates' rewards, you definitely need to notify them about this. Here, you can determine the moment when these notifications are going to be sent.
  • Sandbox mode - enable this mode for the module's functionality testing purposes.

In case if '0' is selected, the reminder is will not be sent.

Email Options

Email Options allow you to сonfigure the notification system of the extension.

  • Email Sender. Here, you can specify the email address acting as the sender of all email notifications.
  • Email template of Notification About New Friends Reward. This option defines the template to be sent to brand advocates about their new rewards.
  • Expiration Reminder Email Template. Here you can set up the email template notifying brand advocates that their rewards expire soon.
  • Email Template of Notification About Reward Expiration. Finally, the option defines the template for notifications telling brand advocates that their rewards have been expired.

Refer a Friend is delivered with some default templates. You can use and customize them or add your own ones.


As soon as the general settings of the extension are configured we can proceed to set refer-a-friend program rules. The main thing is that rules define the rewards earned by brand advocates and the discounts provided for new customers. The Rules section is located along the following path: Marketing > Refer a Friend by Aheadworks > Rules.

Rules Grid

Each refer-a-friend rule is applied to one Magento website. So, in case if you manage one website, the module doesn't display the Rules page and grid. Instead, it redirects your immediately to the rule editing page. But, if you have several websites in one Magento installation, you can create a separate rule for each of them.

The Rules grid contains 4 columns:

  • Rule name. A custom rule name implied to distinguish it from other rules;
  • Rule Status. The column shows whether the rule is enabled or disabled;
  • Website. The website a particular rule is assigned to;
  • Action. The column allows you to delete or edit rule right on the spot.

The Rules grid is a Magento 2 grid so it allows you to sort and filter grid attributes, customize its view, etc. On this page, you can also create a new rule using the Add Rule button.

Rule Editing

Image RemovedRule EditingImage Added

The Rule rule editing page contains the following configuration options:

  • Rule Name. The text field to be filled with a rule name;
  • Rule Status. The box allows you to enable or disable the rule;
  • Website. The multi-selector to assign the rule to a particular Magento website;
  • Apply to Shipping Amount. The toggle switch button that allows you to choose either applying rewards and discounts to shipping charges or not.

Rule Conditions

Rule conditions are provided on the same page in a human-readable form.

  • Customer Registration. First of all, you need to determine whether friends registration is mandatory to get the discount on their first purchase. We offer you to set it mandatory in order to avoid the chance that one customer receives several discounts.
  • Friend Discounts. Next, you need to determine the discount amount and make it either fixed or % of its first order.
  • Brand Advocate Rewards. These rewards are fixed so you need only to determine their amounts As in the case with friend discounts, these discounts can be either fixed of %.

That's it. The rules are configured. Now their terms are clearly displayed in the customer accounts of brand advocates on the frontend.


In order to make the 'Referral Program' tab visible to customers in their accounts, you need to configure at least one rule.


As soon as the rule configuration is finished, the extension is ready to work and invite new customers. So, the next backend section is mostly intended to provide you with additional options to track and manage the program more consciously.
The Advocates section can be found as follows: Marketing > Refer a Friend by Aheadworks > Advocates.

Advocates Grid

The main page of the section contains the Advocates grid and referral program performance statistics.

The Performance area of the page contains two indicators. Quantity of Orders Made by Friends displays the share of orders made by friends in % out of the total number of orders in the store for last 30 days. Total Amount Made by Friends is the same indicator related to the monetary value of friends' and all website orders.

The Advocates grid comprises the following columns:

  • Advocate Name. Contains customer names;
  • Email. Contains customer emails;
  • Web Site. Displays the web site a customer operates in;
  • Invited Friends, Total. Shows the number of invited friends by this particular customer;
  • Current Balance. Balances of rewards earned by brand advocates;
  • Nearest Expiration Date. Displays the dates of reward expirations.
  • Action. Contains active links to Advocate Information pages.

Advocate Information Page

The Advocate Information Page contains two distinct areas: Summary and Transactions History.


This area allows you to track the performance of individual brand advocates, including their number of invited friends, current reward balances, and nearest expiration dates.

Transactions History

The Transactions History section area shows the history of all transactions in a dedicated grid. The grid contains the following columns:

  • Date. Displays the date when the transaction occurred;
  • Action. Describes the essentials of the transaction;
  • Amount. Displays balance increments or decrements in green and red accordingly;
  • Comment for Admin. Comments to the transactions available to admins;
  • Reward Balance. The balance available after the transaction.

The same as any Magento grid, this one makes it possible to sort and filter data and customize the view.

The greatest benefit and value brought by this section is that it allows you to manually update particular reward balances. You can use this opportunity in case of order refunds or in order to additionally award particular brand advocates for their prominent achievements. Each such transaction can be accompanied by comments visible to admins only.