Getting Started

Welcome to the Affiliate documentation.

Here, you will find everything you need to set up your Affiliate service and create a vast promotional network, motivating your customers with enticing income potential.

You will be able to launch fully-featured affiliate programs for your store with this extension! There's no need to use third-party services and pay their requisit fees anymore. Drive more sales from alternative channels and let your affiliates earn additional money.

Go ahead, dive in!

Firstly, please find our extension in the My Downloadable Products section of our store. Learn how to install extension, and proceed with Quick Start, which will guide you in setting up your Affiliate service.

How to install the extension

Installation via composer (preferably)

We recommend this installation method because the composer automatically checks and installs necessary dependencies.

  1. Back up your store's database and web directory.
  2. Log in to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  3. Copy the installation instructions from the page My Downloadable Products to the SSH console and press ENTER.

  4. Run the command php -f bin/magento module:enable Mirasvit_Core Mirasvit_Affiliate to enable the extension.
  5. Run the command php -f bin/magento setup:upgrade to install the extension.
  6. Run the command php -f bin/magento cache:clean to clean the cache.
  7. Deploy static view files

    rm -rf pub/static/*; rm -rf var/view_preprocessed/*; php -f bin/magento setup:static-content:deploy

Installation via direct file upload

You can also install the extension via direct files uploading.

  1. Go to My Downloadable Products / View & Download.

  2. Unpack the .zip package and copy the contents to the Magento root directory.
  3. Log in to the SSH console of your server and navigate to the Magento root directory.
  4. Run the command php -f bin/magento module:enable Mirasvit_Core Mirasvit_Affiliate to enable the extension.
  5. Run the command php -f bin/magento setup:upgrade to install the extension.
  6. Run the command php -f bin/magento cache:clean to clean the cache.
  7. Deploy static view files

    rm -rf pub/static/*; rm -rf var/view_preprocessed/*; php -f bin/magento setup:static-content:deploy

Install the extension for Hyva

  1. Run the command to obtain the Blog MX Hyva component

    composer require hyva-themes/magento2-mirasvit-affiliate
  2. Enable the installed Hyva component:

    bin/magento module:enable Hyva_MirasvitAffiliate
  3. Update the Magento database schema and data with the command:

    bin/magento setup:upgrade
  4. Compile code to generate the contents of the Magento var/di folder:

    bin/magento setup:di:compile
  5. Run the command below to clean the cache:

    bin/magento cache:flush

Quick Start

Our Affiliate extension comes with a set of pre-defined Programs and basic promotional materials for each customer that will join your promotional network, letting you begin building your Affiliate policy out-of-box.

However, there's more you need to do to create and tune up for maximum flexibility and efficiency of your promotion.

  1. Create a set of attractive Banners, so your Affiliates can spread rich information about your goods and services.

  2. Tune up, or even create new Programs, which will turn commissions into a flexible, motivating engine.

  3. Issue special Coupons for your Affiliates, so they can attract new customers with discounts.

  4. Track all your Transactions and Withdrawal Requests, analyze them, and tune them up for maximum efficiency at Configuration Settings.

  5. Create rich and informative Email Notifications for each action in your workflow to keep your Affiliates aware of their earnings and your staff of customers' requests.

  6. Manage your Affiliate Accounts on a micro-level, building an effective promotional network.

  7. Use our Dashboard to have all critical information available at your fingertips.

This should be a good place to start.

Refer to the appropriate sections of our manual to get more info.

Configuration settings

image

Settings that allow you to tune-up your Affiliate policy are located at Marketing -> Affiliates -> Settings, and is broken into the following sections:

  • Account
  • Commission Workflow
  • Withdrawal Workflow
  • Coupons
  • Email Notification Settings

Account

image

Option Description
Auto Sign Up after creating account If the option is enabled, the affiliate will automatically be signed to the Affiliate program after creating their account.
Approval is required If the option is disabled, the affiliate account will automatically be approved after registration.
Otherwise, you need to manually approve the account at the Marketing > Affiliates > Account.
Links Referral Param An Additional parameter which should be added to the referral links for inclusion to the affiliate policy.
Display affiliate link only for registered affiliates If the option is enabled, all customers will see a link to the affiliate section in their personal account.
Additional Fields A button that leads to the Account Additional Fields page. On this page, custom fields could be added to affiliate account settings (Read more about this here)

Commission Workflow

image

Option Description
Add commission when the order has obtained status Commission will be applied when order receives the selected status.
Subtract commission when the order has obtained status Commission will be subtracted when order receives the selected status(es). Additional statuses for this and above option can be added at Stores -> Settings -> Order Status.
Subtract commission when credit memo is created If the option is enabled, the commission will be subtracted after creating a credit memo.
Commission holding period (days) Allows you to hold the commission transactions within the defined period.
Sales Commission Lifetime (days) Affiliate will receive commissions from referred customers during this period. By default, commissions expire after 365 days (1 year).
Assign Priority Assignment priority for commissions.
There are two available options: Assign to first referred affiliate and Assign to last referred affiliate.

Withdrawal Workflow

image

Option Description
Minimum withdrawal amount Sets the affiliate minimum withdrawal amount.
Payment Methods Allows you to turn on/off different services of money transfer to withdraw commissions. Currently supported services: PayPal. Skrill, Other (e. q. customer-defined).

Coupons

image

Option Description
Enable Coupon Enables the possibility for affiliates to receive coupons for referring friends. This coupon will be displayed at Promotional Materials of Customer Account, and it's unique for each customer.
Coupon Pattern If the option above is enabled, this option defines regular expression, how these coupons look like. By default, it is AFL-[A-Z]{4} (AFL-UYTR, for example). Read more about regular expressions here.

Email Notification Settings

image

This section is broken into two collapsible subsections, each of which contains notification settings for Affiliates and Admin Staff. Each option corresponds with an action, on which email notification can be sent, and defines a template that will be used for that email.

If you do not need notification to be sent, set Disable these emails as an appropriate option.

For Affiliates

Option Description
New Account Template for notification on creating an affiliate account.
Account has been approved Template for notification on affiliate account approval.
New Transaction Template for notification on new affiliate transaction completion.
Balance has been updated Template for notification on affiliate balance update.

For Admin

Option Description
New Account Template for admin notification on creating a new affiliate account.
New Withdrawal Request Template for admin notification on the new withdrawal request

Note

Read more on email notification templates at Email Notification Templates section.

Affiliate Dashboard

The affiliate Dashboard is a starting point of our extension, which contains the statistical data of the currently defined affiliate policy results. It consists of two panels - Main and Latest Activity.

Main Dashboard Panel

Main Panel contains the Statistics Ribbon, which holds the following result markings:

  • Active Affiliates - displays the number of customers who have joined your affiliate programs.
  • Visits - quantity of visits that were made through promotional materials, such as Banners, Referral Links and Coupons.
  • Revenue - income that your store has earned in total for the last seven days.
  • Commissions - the amount of money that was earned by your affiliates.
  • Total Affiliates - displays the total quantity of affiliates who have joined your programs.
  • Total Ballance - displays the total sum of commissions not withdrawn by affiliates.
  • Total Withdrawals - displays the total sum of withdrawn commissions.
  • On hold - displays the total amount of held commissions.

The score table of Most Valuable Affiliates is located under this ribbon, which displays the Affiliates that contributed to your store the most. It provides the following information per row:

  • Affiliate - name of Affiliate customer.
  • Total Earning - the total amount of commission, earned by an Affiliate
  • Clicks - the total number of clicks received by promotional material of the Affiliate.

Note

The score position is based on the total earning amount, so if the customer has gotten many clicks but little income - it will be placed into a secondary position.

Latest Activity Panel

This panel is broken into individual cells, each representing a single Transaction, with the most recent at the top. Each cell contains the following information:

  • Date of transaction - Human-readable transaction date displayed at the right side in the bottom.
  • Customer - a highlighted link to the account of a customer that triggered a transaction.
  • Order - if the customer referred to order, its number will be highlighted and turned into a link.
  • Transaction summary - a short description of the transactions.
  • Currency amount -the amount of money earned or withdrawn with the current transaction.

This information is adequate to keep your Affiliate policy at your fingertips.

Managing Programs

Programs are the basic building blocks of your Affiliate policy. Each program represents a method, which customers can use to turn their investment in promotional activity into real money.

All currently defined programs are located at Marketing -> Affiliate -> Programs. There, they can be managed, activated, and removed.

image

Our extension comes with four basic programs that customers can join:

  • Pay per Impression - used for banners that customers include to their pages, blogs, or even stores. The commission is generated per unique view of the banner.
  • Pay per Lead - used for both referral links and other clickable promotional materials that can lead customers to your store. The commission is generated per each unique visit to the store made through a link or banner.
  • Pay per Click - used for banners and other clickable materials. The commission is generated on a per-click basis.
  • Pay per Sale - used for orders placed after visiting a store through a referral link or banner. The commission is generated as part of the actual sale.

Each of these basic programs can be modified and fitted to your vision of the Affiliate policy. Moreover, multiple programs of the same type can be active simultaneously, providing you with a highly flexible approach .

How to create a new Affiliate Program

Go to Marketing -> Affiliate -> Programs and press the Add New button. You will be brought to the creation page, which consists of the following several sections:

General Settings

image

As the main part of the Program setup, this section is always visible, unlike others. It contains the following fields:

  • Name - an intuitive name for the Program.
  • Description - description of the Program.
  • Type - type of Program (see above for details). Each type triggers the appearance of its own additional section with the following tiers:
    • Pay per Sale
    • Pay per Lead
    • Pay per Click
    • Pay per Impression
  • Store Views - determines in which stores this program can be used.
  • Is Active - determines whether this Program is active, and if customers can use it for generating commission.
  • Active From - date from which the Program becomes eligible for generating commissions.
  • Active To - date after which the Program stops generating commissions.
  • Is Visible - determines whether the Program details will be displayed at the customer's account.
  • Priority - the priority of the program (affects only Pay per Sale programs). If the orders match more than one program, the program with the highest priority will be used.

Each Affiliate Program allows you to configure commissions for each Affiliate Group created in the extension.

The tiers' definitions are determined in separate sections, which become visible only after the Type selection, and can differ depending on the particular Type.

Conditions

image

Permits you to apply the commission only to cart items matching the following conditions:

Coupon

image

This section allows you to choose one of the existing rules from your Marketing -> Promotions -> Cart Price Rules page. You can use configurable rules and offer discounts on specified products only.

  • Coupons Is Active - determines whether new customers can use the coupon.
  • Apply Cart Price Rule - determins which Cart Price Rules will be applied when customers purchase a new product. Discounts will only be applied for products specified in the rule. Please note that you need to use “Auto Generation” for your coupon rule.

Pay per Sale Commission

image

Tiers of this type of program have the following parameters:

  • Affiliate Group - affiliate group for which the commission is configuring.
  • Commission Type - is a type of commission that the customer receives on order completion. There are three possible commission types:
    • Percent of order amount - the commission is calculated based on the amount of the heretofore paid order total.
    • Percent of cart amount - the commission is calculated from the subtotal of products bought, excluding taxes and/or shipping fees.
    • Fixed amount - the commission is a fixed monetary amount that drops to the customer account upon order completion.
  • Commission From First Order - is a value representing either a percent (between 0 and 100), or a fixed monetary amount. This commission will be received only from the first order made by the customer related to the affiliate account.
  • Commission From Second and More Orders - is a value representing either a percent (between 0 and 100), or a fixed monetary amount. This commission will be received from the second and higher orders made by the customer related to the affiliate account.

Pay per Lead Commission

image

Tiers of this type of program have the following parameter:

  • Affiliate Group - affiliate group for which the commission is configuring.
  • Commission Amount - a fixed monetary amount which drops to the customer account when somebody leads to your store using their promotional materials.

Pay per Click Commission

image

Tiers of this type of program have the following parameter:

  • Affiliate Group - affiliate group for which the commission is configuring.
  • Commission Amount - fixed monetary amount which drops to the customer account when somebody clicks on one of their promotional materials.

Pay per Impression Commission

image

Tiers of this type of program have the following parameter:

  • Affiliate Group - affiliate group for which the commission is configuring.
  • Commission Amount - fixed monetary amount which drops to the customer account when somebody views one of their promotional materials.

Managing Affiliate Groups

Affiliate Groups is a helpful tool that allows you to configure different commissions in Affiliate Programs for affiliates assigned to various groups.
Immediately following installation, the extension provides you with one default affiliate group to which all affiliates will be assigned.

Groups can be one of the following types: manual-updating or automatically-updating group. Automatically-updating groups are updating on cron basis.

How to create a new Affiliate Group

image

Go to Marketing -> Affiliate -> Affiliate Groups and press the Add New button. You will be brought to the creation page, which consists of several sections:

General Settings

image

As the main part of the Affiliate Group setup, this section is always visible, unlike others. It contains the following fields:

  • Name - an intuitive name of the Affiliate Group.
  • Is Default - the flag to set the group as default. Only one group can be named the default. Only the auto-updating group can be set as default. Conditions will be ignored if the group is set as default.
  • Update Automatically - determines whether the group should or shouldn't be updated automatically by cron.
  • Is Hidden In Frontend - determines whether this Affiliate group should or shouldn't be visible on the front of the website. If enabled - this Affiliate Group won't be displayed to visitors of the website.
  • Description - the field to describe the Affiliate Group for visitors of the website.

Conditions

image

Visible and affects only for auto-updating groups.

Here you can set rules based on which Affiliates will be assigned to this group. The extension provides the next rules:

  • Number of orders from referred customers - the number of orders made by customers related to the affiliate account from which the Affiliate has already received commissions.
  • Sales Amount from referred customers - the total amount of orders made by customers related to the affiliate account from which the Affiliate has already received commissions.

Assigned Affiliates

image

The table displays Affiliates assigned to the current Affiliate Group. This section provides you with the ability to add Affiliates to the Affiliate Group manually (allowed only for manual-updating Affiliate Groups)

Managing Accounts

Each customer who has joined your Affiliate policy automatically created an account that provides a single place from which his or her progress and involvement can be tracked and viewed.

All of these accounts are located at Marketing -> Affiliate -> Accounts.

Note

You cannot remove a customer from your Affiliate program, but you can either exclude them from your Programs or revoke their approval, thus effectively cutting off their commissions flow.

Working with Affiliate Accounts

image

Each account managing page consists of four subsections:

  • General Information - contains base profile of Affiliate.
  • Transactions - contains a filtered grid, where all their transactions can be viewed
  • Withdrawals - also contains a filtered grid, with all of their withdrawal requests.
  • Referred Customers - list of customers who registered on your store using promotional materials of the current Affiliate.

Some of these subsections also contain additional information - follow the respective links above to read more.

General Information

image

This section contains the Affiliate's profile, with the following fields:

  • Customer - name and email of the Affiliate.
  • Affiliate Group - The Affiliate Group to which the Affiliate is assigned. The Affiliate Group can be changed manually only to one of the manually-updating groups or the default group.
  • Unique Identifier - UID has been generated automatically upon joining your Affiliate policy, and is used in Referral Links.
  • Status - current status of Affiliate. There are the following possible states:
    • Pending - this is the statement that the Affiliate receives when they join your policy, but the settings option Approval is required is set to Yes (Read more about this here)
    • Approved - the customer is a part of your Affiliate policy and is eligible to join your Programs.
    • Not Approved - the customer is cut off from your Affiliate policy, and stripped from your Programs. Use this option when you need to exclude a customer from your policy.
  • Referring Website - the website on which the customer wishes to place your promotional materials. This field is added by default but could be disabled or removed at Marketing -> Affiliate -> Additional Fields.
  • Is Subscribed - indicates whether the customer is subscribed to notifications of the Affiliate policy.
  • Payment Method - is a method through which withdrawals are made. One of the methods should be selected as defined at the Payment Methods settings option (Read more on this here)
  • Payment information - determines additional info for payments.
  • Programs - the checked list of programs to which the current Affiliate is plugged. Use this option if you wish to exclude the customer from one specific Program, but not from the Affiliate policy as a whole.

The General section may also contain additional Custom Fields. These fields could be added and configured at Marketing -> Affiliate -> Additional Fields (Read more about this here)

This section also contains a Statistics table, from which can be seen promotional statistics of the current Affiliate:

  • Clicks - the number of clicks made on their promotional materials.
  • Leads - the number of leads to your store that were made by their promotional materials.
  • Impressions - the number of views there were made on their promotional materials
  • Sales - sales that were made using materials of this Affiliate (using a coupon, for example).

Coupons

image

This section contains a Coupons table, on which can be seen a unique coupon code, issued to the Affiliate for each program, that they can give to friends and thus build a promotional chain. To edit an automatically generated coupon, click on the row.

Transactions

image

This section shows all completed transactions. The extension will update the data by cron.

Withdrawals

image

This section shows all completed withdrawals. The extension will update the data by cron.

Events

image

This section shows all completed Events.

Referred Customers

image

This section is used for tracking how many referral customers of this Affiliate have made. The below statistics display their promotional chain:

  • Name - name of the referred customer.
  • Email - email of the referred customer.
  • Action - last action made by the referred customer.

Note

In some cases, you may wish to include already registered customers in the promotional chain of the current Affiliate.
Press Add Customers to carry it out. A filtered grid of customers will appear on which you can select existing customers in bulk and add them using the Add Selected Customers button.

Issuing Banners

Banners are part of the Promotional Materials which a customer receives upon joining an Affiliate program.

A banner is a promotional graphical image which also acts as a referral link, linked with your store. Our extension records each click and view (impression) of a given banner and collects statistics.

image

All banners are managed at the Marketing -> Affiliates -> Banners grid, which shows the following information:

  • Preview - a small thumbnail on the banner image.
  • Title - the title of the banner.
  • Type - type of banner (read more below).
  • Statistics - contains statistic markings of the current banner. Includes:
    • Clicks - the quantity of unique clicks on the image.
    • Impressions - unique views of the banner.

Banners are currently available to customers who marked Yes in the column Is Active. From the Action column, you can either edit or remove the banner.

How to Create New Banner

image

To create a new banner, press the Add New button, and you will be brought to the creation page. It consists of the following fields:

  • Name - the name of the banner
  • Type - the type of the banner. There are two available types, which are:
    • Text - the text link with promotional text.
    • Image - the regular image banner.
  • Is Active - this determines whether this banner is active and available to Affiliates.

Depending on the Type, there can be two additional subsections, which are visible if the corresponding type is selected:

Text section

image

Contains additional fields for a text-based promotional banner:

  • Link - the actual link that leads to your banner.
  • Text -the promotional text that will accompany that link.

Image section

image

Contains additional fields for regular banner:

  • Link - the actual link that leads to your banner.
  • Image - a file uploading widgets, which allows you to upload a banner image of your choice. Only JPEG, GIF, and PNG images allowed.
  • Width - the preferred width of the banner image (for inclusion to the banner code for the customer)
  • Height - the preferred height of the banner image (for inclusion to the banner code for the customer)

Transactions

All transactions are located at Marketing -> Affiliate -> Transactions. Each action which is a part of the Affiliate programs will be recorded as a transaction, and not a single one can be removed. If for some reason the balance of the Affiliate is incorrect, you will need to correct it with a Manual Transaction.

image

Transaction grid provides the following information:

  • Affiliate - email of customer who has joined your Affiliate policy.
  • Amount - money amount that was involved in the transaction. It can be both positive and negative.
  • Type - type of transaction. There are two types available:
    • Commission - addition to the customer's balance.
    • Withdrawal - transfer from the customer's balance to the external payment system.
  • Description - short description of the transaction.
  • Status - status of the transaction. There can be one the following states of transactions present:
    • On Hold - can appear when the option Commission holding period is enabled (read more here).
    • Completed - the transaction is approved, and changes are applied to the balance.
  • Created At - date of transaction.

How to make Manual Transactions

image

Go to Marketing -> Affiliate -> Transactions and press the Add New button. You will be brought to the transaction creation page, which contains just three fields:

  • Affiliate - drop-down list of customers who have joined your Affiliate policy. You can select only one per manual transaction.
  • Amount - the amount of money that shall be distributed to the customer.
  • Message - short transaction description.

Note

You can create manual transactions for both positive and negative currency amounts, though in either case, they will be marked as Commission.

Withdrawals

Withdrawals consist of money transfers from a customer's commission balance to some external payment system. Typically, customers request a withdrawal, but they can also be created manually (although the payment system still needs to be chosen by the customer).

image

All withdrawal requests are located in their dedicated grid at Marketing -> Affiliate -> Withdrawals, where they are arranged in a grid with the following information:

  • Affiliate - email of the customer who has joined your Affiliate policy.
  • Amount - money amount that the customer wishes to transfer to an external payment system.
  • Fee - surcharge that shall be paid additionally for transfer.
  • Request date - date on which the customer made a withdrawal request.
  • Type - current status of the withdrawal. Read more on these statuses below.

How to create manual Withdrawal Request

image

Go to Marketing -> Affiliate -> Withdrawals, and press the Add New button. You will be brought to request a creation page with the following fields:

  • Affiliate - a customer that needs to withdraw funds. Only one customer can be selected per request.
  • Status - status of request. There are four possible states of withdrawals:
    • Pending - this status is assigned automatically to each new withdrawal.
    • Approved - this status should be set when customers are allowed to chose a payment method and make a transfer.
    • Denied - this status is assigned when for some reason, withdrawal is forbidden.
    • Completed - this status is assigned automatically when the transfer is made.
  • Amount - amount of money that should be transferred.
  • Fee - surcharge that should be paid additionally.

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()}}

Account Additional Fields

Account additional field settings located at Marketing -> Affiliate -> Additional Fields.

image

This page contains a list of additional account fields, which could be added, changed, or removed. These fields are used on the Sign In to Affiliates and Affiliate Account Settings pages.

Each field record has the next parameters:

  • Key - index of the name of the additional field. It is submitted with the form as part of a name/value pair.
  • Label - caption for the field.
  • Field Type - a type of form control:
    • Text - an input field where the user can enter text data.
    • Textarea - a multi-line text input control.
    • Checkbox - a checkbox allowing single values to be selected/deselected.
    • Checkbox Group - checkboxes, allowing several values to be selected from provided options.
    • Radio Button Group - radio buttons, let a user select only one from provided options.
    • Select - a drop-down menu of options.
  • Enabled - sets whether the field will be used for Account settings.
  • Required - sets whether a user must specify a value for the field before the form can be submitted.
  • Field Placeholder - placeholder text for the field with the "Text" or "Textarea" field type.
  • Options - list of options for the field with the "Checkbox Group", "Radio Button Group", or "Textarea" field type.
    • Option Key - represents the option value to be submitted with the form.
    • Option Label - caption for the option.

Migration from Magento 1 to Magento 2

Below are examples of scripts that can be used to transfer data from a Mirasvit Affiliate for Magento 1 to a Mirasvit Affiliate for Magento 2.

To use scripts, you will need the help of a PHP developer. Scripts may contain bugs and not transfer all necessary data, meaning that you may need to adjust them for your needs.

Migration service is not a part of our support service.

Click on the names of scripts below to download:

How to perform Migration

Follow these steps to perform the migration correctly:

  1. Run standard Magento 2 migration, and make sure that customers and orders have been transferred from your M1 store to M2;
  2. Make sure that the Affiliate for Magento 2 is installed on your M2 store.
  3. Place mirasvit_affiliate_m1_export.php to the root of your M1 store, and run it either:
    • From the browser by opening the URL http://store_m1.com/mirasvit_affiliate_m1_export.php, or
    • From the SSH/Console: navigate to your store's root and run the command php -f mirasvit_affiliate_m1_export.php
  4. If the script returns success, the file affiliate_export.xml will be created at the root of the store with all of your data. Transfer it to the root of your M2 store;
  5. Place mirasvit_affiliate_m2_import.php to the root of your M2 store, and run it either:
    • From the browser by opening the URL http://store_m1.com/mirasvit_affiliate_m2_import.php, or
    • From the SSH/Console: navigate to your store's root and run the command php -f mirasvit_affiliate_m2_import.php
  6. Check migrated data.
  7. When the migration is completed, remove both migration scripts.

Troubleshooting

In some cases, the import script can crash on timeout or a memory overloading error (due to large quantities of data). In this case, you should restart the import script by reloading the browser page. It will skip previously uploaded data, and proceed from the last unprocessed record.

How-To

Contents

  • How can I translate affiliate into different languages?

How can I translate an affiliate into different languages

The extension uses the same logic for translations as default Magento. More details: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/translations/xlate.html)

Our i18n files should be located at: vendor/mirasvit/module-affiliate/src/Affiliate/i18n/

Create a separate file for your language (en_US.csv, de_DE.csv). The names for all languages can be found via this command:

php -f bin/magento info:language:list

Override the strings in your dictionary file:

"Original line" , "Translated line"

Run this command to see the changes:

php -f bin/magento setup:static-content:deploy

php -f bin/magento cache:flush

The custom themes will be displayed instead of the default for your language.

How to upgrade the extension

To upgrade the extension, follow these steps:

  1. Back up your store's database and web directory.
  2. Log in to the SSH console of your server and navigate to the root directory of the Magento 2 store.
    If the extension was installed via:

    • Composer: run the command composer require mirasvit/module-affiliate:* --update-with-dependencies to update the current extension with all dependencies.

      Note

      If you have the Hyva installed, run:

      composer require mirasvit/module-affiliate:* hyva-themes/magento2-mirasvit-affiliate:* --update-with-dependencies

      Note

      In some cases, the above command is not applicable, or you cannot upgrade just the current module and need to upgrade all the Mirasvit modules in a bundle. In this case, the above command will have no effect.

      Instead, run the composer update mirasvit/* command. It will update all the Mirasvit modules installed in your store.

    • Direct file upload: download the new extension package from our store and copy contents to the root Magento directory
  3. Run the command php -f bin/magento module:enable Mirasvit_Core Mirasvit_Affiliate to re-enable the extension.

    Note

    If you have the Hyva installed, run:
          bin/magento module:enable Mirasvit_Core Mirasvit_Affiliate Hyva_MirasvitAffiliate

  4. Run the command php -f bin/magento setup:upgrade to install updates.
  5. Run the command php -f bin/magento cache:clean to clean the cache.
  6. Deploy static view files

    rm -rf pub/static/*; rm -rf var/view_preprocessed/*; php -f bin/magento setup:static-content:deploy

Disabling the Extension

Temporarily Disable

To temporarily disable the extension, please take the following steps:

  1. Log in to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  2. Run the command php -f bin/magento module:disable Mirasvit_Affiliate to disable the extension.

    Note

    If you have the Hyva installed, run:

          bin/magento module:disable Mirasvit_Affiliate Hyva_MirasvitAffiliate

  3. Log in to the Magento backend and refresh the store cache (if enabled).

Extension Removing

To uninstall the extension, please take the following steps:

  1. Log in to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  2. Run the command composer remove mirasvit/module-affiliate to remove the extension.

    Note

    If you have the Hyva installed, run:

              composer remove mirasvit/module-affiliate hyva-themes/magento2-mirasvit-affiliate

  3. Log in to the Magento backend and refresh the store cache (if enabled).

Change Log

1.5.5

(2024-11-15)

Fixed

  • Fixed the issue with the customer-affiliate relation not being acquired
  • Fixed the issue with error when registering a customer in affiliate program from the admin panel

1.5.4

(2024-08-06)

Fixed

  • Unexpected logout

1.5.3

(2024-07-12)

Fixed

  • Issue with filter by type in the withdrawal grid

1.5.2

(2024-06-17)

Fixed

  • Fixed the issue with role permissions for Account Additional Fields settings

1.5.1

(2024-06-17)

Fixed

  • Fixed the issue with blank pages when AdGuard Chrome extension installed

1.5.0

(2024-06-11)

Features

  • Ability to manage account additional fields

1.4.37

(2024-05-27)

Fixed

  • Bestsellers in widget

1.4.36

(2024-05-20)

Fixed

  • Issue saving configuration in Magento 2.4.1 and below

1.4.35

(2024-05-09)

Improvements

  • Support Mirasvit GDPR extension v1.4

1.4.34

(2024-04-24)

Improvements

  • Ability to add custom Payment Methods

1.4.33

(2024-03-05)

Fixed

  • Preventing error output when requesting a non-existent banner

1.4.32

(2024-02-26)

Fixed

  • Issue with empty transaction description

1.4.31

(2024-02-01)

Fixed

  • Issue with impression statistics

1.4.30

(2024-01-18)

Fixed

  • Issue with commission calculation for multistore

1.4.29

(2023-12-08)

Fixed

  • Chart for all sites on statistics page
  • Calendar on statistics page

1.4.28

(2023-11-09)

Fixed

  • Issue with filtering transactions by status in the transaction grid

1.4.27

(2023-11-07)

Improvements

  • Ability to get info for all sites on the statistics page

1.4.26

(2023-10-09)

Fixed

  • Error on the program editing page if coupons are used and Use Auto Generation is disabled in the Cart Price Rules settings
  • Compatibility with Magento 2.4.6

1.4.25

(2023-09-28)

Fixed

  • Multiple commission charges in case of error when sending email

1.4.24

(2023-09-18)

Improvements

  • Export Referred Customers
  • Coding Standards
  • Explain commission calculation

Fixed

  • Issue with commission calculation if "Subtract commission when order has obtained status" is empty
  • Issue with missing block name in layout when editing Group and Program on Magento EE

1.4.23

(2023-08-03)

Fixed

  • Status variable for email templates

1.4.22

(2023-08-02)

Improvements

  • Added sum of commission per customer in the referred customer list
  • Referring Website field optional when registering an affiliate

Fixed

  • Compatibility of email templates with Magento 2.4.4 and later
  • Detection of the visitor's IP address

1.4.21

(2023-06-20)

Fixed

  • Calculation of commission for guest orders for programs with Customer Group in the condition

1.4.20

(2023-06-15)

Fixed

  • Processing programs with activity period

1.4.19

(2023-05-12)

Fixed

  • Is Processed column in event grid on edit account page
  • Issue with removing an Affiliate from a Group
  • Issue with tracking clicks

1.4.18

(2023-03-30)

Improvements

  • Added loading indicator on Promotion Materials page

1.4.17

(2023-03-27)

Fixed

  • Removed unused Add New button

1.4.16

(2023-03-15)

Fixed

  • PHP 8.2

1.4.15

(2023-03-13)

Fixed

  • Issue with filtering by date

1.4.14

(2023-03-02)

Fixed

  • Widget configurator on Promotion Materials page

1.4.13

(2023-02-16)

Improvements

  • Added support of Magento 2.4.6

Fixed

  • Base Currency in backend for Magento 2.4.6
  • Currency in chart on Statistics Page
  • Currency when requesting a withdrawal

1.4.12

(2023-02-13)

Improvements

  • Ability to hide events with zero commission on the Statistics Page

1.4.11

(2023-01-30)

Improvements

  • Do not create transactions for old orders

1.4.10

(2023-01-17)

Improvements

  • Behavior of Statistics page if calendar buttons are used

1.4.9

(2023-01-06)

Fixed

  • TypeError on Promotion Materials page

1.4.8

(2022-12-29)

Fixed

  • Error "Return type of ReverseRegex\Generator\Node::offsetExists($key)" during Coupon generation

1.4.7

(2022-11-14)

Fixed

  • Category change when editing Program Conditions

1.4.6

(2022-10-27)

Features

  • New rules in Affiliate conditions (for orders with a commission)

1.4.5

(2022-10-14)

Fixed

  • Error if there is no corresponding product for Order Item or Quote item

1.4.4

(2022-08-15)

Fixed

  • Compatibility with Magento 2.4.5
  • Sometimes the referrer was lost

1.4.3

(2022-06-29)

Fixed

  • Issue with commission calculation for Fixed Amount Commission Type

1.4.2

(2022-06-22)

Fixed

  • Issue with removing Referred Customer on the account edit page

1.4.1

(2022-06-20)

Improvements

  • remove db_schema_whitelist.json

1.4.0

(2022-06-07)

Improvements

  • Migrate to declarative schema

1.3.40

(2022-05-03)

Fixed

  • Issue with sorting Accounts table
  • Issue with changing Commission lifetime

1.3.39

(2022-04-19)

Fixed

  • Issue with changing Commission lifetime

1.3.38

(2022-04-15)

Fixed

  • Variables in email template

1.3.37

(2022-04-13)

Fixed

  • Subscription switch

1.3.36

(2022-04-04)

Fixed

  • Issue with Affiliate Tab link in customer account

1.3.35

*(2022-03-24)


1.3.34

(2022-01-26)

Features

  • Сreating a withdrawal request on a schedule

Fixed

  • Compatibility with Magento 2.4.4
  • Issue in the control panel if the order does not exist

1.3.33

(2022-01-14)

Fixed

  • Issue with processing orders without quote_id

1.3.32

(2022-01-06)

Fixed

  • Issue with calculating the commission for the Sale Program

1.3.31

(2021-12-24)

Fixed

  • Customer assignment issue when using a coupon
  • Issue with editing the Program if there are a lot of Cart Price Rules

1.3.30

(2021-10-25)

Fixed

  • Issue with the commission after delete the program

1.3.29

(2021-10-13)

Fixed

  • Skip empty periods on the chart

1.3.28

(2021-09-29)

Fixed

  • Issue with affiliate blocks

1.3.27

(2021-09-22)

Improvements

  • Removed third party scripts from the widget

Fixed

  • Issue with affiliate-welcome block
  • Issue with reset affiliate group while editing

1.3.26

(2021-09-03)

Fixed

  • TypeError on the Promotion Materials page

1.3.25

(2021-08-27)

Improvements

  • Added charts to account statistic
  • Added pagination to the transaction list
  • Added event list to account statistic

1.3.24

(2021-08-11)

Improvements

  • Added Send To Store Credit button

1.3.23

(2021-08-09)

Improvements

  • Added column Active to the list of programs
  • Added message if Store Credit extension not enabled.

1.3.22

(2021-08-06)

Features

  • Lifetime commission in condition of sales program

1.3.21

(2021-07-30)

Fixed

  • Create zero-amount transactions

1.3.20

(2021-07-29)

Fixed

  • Issue with creating empty transactions without an appropriate program

1.3.19

(2021-07-27)

Features

  • Ability to apply different programs for the same order

1.3.18

(2021-07-20)

Fixed

  • Issue with the processing of the program conditions for the bundle of products

1.3.17

(2021-06-17)

Fixed

  • Find account by coupon

1.3.16

(2021-06-17)

Fixed

  • Issue with registration of guest events

1.3.15

(2021-06-17)

Fixed

  • Fixed commission calculation with tax included

1.3.14

(2021-06-14)

Features

  • Ability to hide the referred customers list on the affiliate account page
  • Added Referred Customers page

Fixed

  • Assign priority
  • Hold ability

1.3.13

(2021-06-03)

Fixed

  • Registration of a sale with an empty customer session

1.3.12

(2021-05-25)

Fixed

  • Registration impression event

1.3.11

(2021-05-21)

Fixed

  • Set cookie

1.3.10

(2021-05-20)

Improvements

  • Added example translations

1.3.9

(2021-05-19)

Fixed

  • Issue after removing coupon

1.3.8

(2021-05-12)

Fixed

  • Issue with the calculation of the commission if only part of the products in the order satisfies the program conditions
  • Do not send a notification if the commission is zero
  • Show transactions list

1.3.7

(2021-04-02)

Fixed

  • admin notification

1.3.6

(2021-03-30)

Fixed

  • upgrade data

1.3.5

(2021-03-29)

Fixed

  • Fixed commission calculation if the order currency differs from the base currency

1.3.4

(2021-03-23)

Fixed

  • Show payment methods

1.3.3

(2021-03-23)

Fixed

  • Issue with registering lead
  • Issue with error on the account page

1.3.2

(2021-03-22)

Improvements

  • unique clicks on the account page

1.3.1

(2021-03-19)

Fixed

  • Show transactions from all stores
  • Sender name

1.3.0

(2021-03-17)

Features

  • Affiliate Groups and changes to programs logic

Improvements

  • Code refactoring (starting 1.3.0 - for Magento 2.3 and higher; below 1.3.0 - Magento 2.1 - 2.2)

1.2.3

(2021-02-03)

Fixed

  • Fixed commission calculate for order with quote_id=0

1.2.2

(2021-01-12)

Features

  • Ability to include/exclude tax

1.2.1

(2020-12-17)

Fixed

  • Fixed the issue with dashboard when some accounts were removed

1.2.0

(2020-12-10)

Fixed

  • Fixed the issue with comission not added when statuses changed too fast

1.1.82

(2020-11-17)

Fixed

  • Fixed issue with success message after sign in [#142]()

1.1.81

(2020-10-30)

Fixed

  • Fixed issue with creating/editing programs (Magento 2.4.0) ([#140]())

1.1.80

(2020-09-30)

Improvements

  • Misspelling fixes

1.1.79

(2020-09-16)

Fixed

  • Fixed issue with saving coupons with empty code

1.1.78

(2020-09-07)

Fixed

  • Fixed issue with affiliate account edit after deleting referred customer
  • Fixed issue with affiliate account edit page error in Magento 2.1.*

1.1.77

(2020-08-27)

Improvements

  • Displaying commissions in hold in stats [#126]()

Fixed

  • Fixed issue with not all customers displayed in Account edit form [#128]()

1.1.76

(2020-08-07)

Features

  • Added ability to use several affiliate programs with different cart price rules and differet coupons

1.1.75

(2020-07-30)

Improvements

  • Support of Magento 2.4

Fixed

  • transactions list, affiliate balance

1.1.74

(2020-07-23)

Fixed

  • Fixed issue with affiliate balance after saving transaction from admin panel ([#116]())

1.1.72

(2020-07-21)

Fixed

  • Issue with saving new transaction from admin panel ([#114]())

1.1.71

(2020-07-16)

Features

  • program priority

Improvements

  • Added event section to affiliate account page
  • Customer group and Store conditions
  • Improved referrer tracking
  • new program conditions

Refactoring

  • Change code structure

1.1.70

(2020-05-13)

Fixed

  • Issue with sale programm aplied if no products matches program rules
  • Issue with Amasty/Rolepermissions

1.1.69

(2020-04-13)

Fixed

  • Issue with the subtraction of the commission when order with discount refunded

1.1.68

(2020-03-03)

Fixed

  • commission for self sales/clicks
  • issue with not subtracting commission when order is canceled
  • messages in dashboard activity with 0 commission
  • issue with repeated sign-in requests
  • issue with adding commission after re-enabling program
  • issue with SQL error on affiliate/account/welcome page
  • not adding commission for different users with the same IP
  • issue with increasing date in account/statistics

1.1.67

(2020-01-16)

Fixed

  • Issue with adding/deleting tiers
  • Issue with commission refunding

1.1.66

(2019-12-12)

Fixed

  • Issue with sorting by ID in Add Customers
  • Issue with markup tags inside input fields

1.1.65

(2019-11-18)

Improvements

  • Validate coupon pattern before use it

Fixed

  • Statistics date ranges
  • Possible issue with modal windows (with bootstrap native modals)
  • Duplicate programs after save
  • Error on program edit page (Magento 2.1.x)

1.1.63

(2019-10-23)

Fixed

  • Issue with filters

1.1.62

(2019-09-09)

Fixed

  • Issue with text banner

1.1.61

(2019-08-08)

Fixed

  • EQP

1.1.60

(2019-08-01)

Fixed

  • Added Store Credit to backend as payment method

1.1.59

(2019-08-01)

Fixed

  • Cart grand total value

1.1.58

(2019-07-09)

Fixed

  • Remove shipping refunded from commission

1.1.55

(2019-07-01)

Fixed

  • Credit memo

1.1.54

(2019-05-11)

Improvements

  • Ability to assign rule for apply commission only for allowed products

1.1.53

(2019-05-06)

Fixed

  • Open iframe links in parent window

1.1.50

(2019-05-03)

Fixed

  • Added referral param to widget links too

1.1.49

(2019-04-01)

Improvements

  • Display statistic (in affiliate account) only for processed orders

1.1.48

(2019-03-19)

Improvements

  • Ability to limit number of transactions per relation customer-affiliate (like commission only for first Order)

1.1.47

(2019-03-14)

Fixed

  • Issue with calculation relation time frame

1.1.46

(2019-03-13)

Improvements

  • Flex markup for products widget
  • Ability to hide affiliate link for non-registered affiliates (in customer account)

Fixed

  • Remove header/footer for widget
  • Issue with title on welcome page

1.1.45

(2019-03-07)

Fixed

  • Issue with validation account registration for new customer

1.1.44

(2019-03-04)

Fixed

  • Integration Store Credit extension with withdrawal workflow

1.1.43

(2019-03-01)

  • minor changes

1.1.42

(2019-01-23)

Fixed

  • Issue with banner output (headers already sent)
  • Display issue with signup form

1.1.40

(2019-01-16)

Improvements

  • Ability to register affiliate without customer account

Fixed

  • Stability

1.1.39

(2018-11-29)

Fixed

  • Compatibility with Magento 2.3

1.1.38

(2018-11-14)

Fixed

  • Changed account assignment priorities

1.1.37

(2018-10-16)

Fixed

  • Issue with wrong store for notification emails

1.1.36

(2018-10-10)

Fixed

  • Issue with transaction listing (sorting by account)

1.1.35

(2018-09-06)

Fixed

  • Fixed an issue with adminhtml cookie

1.1.34

(2018-08-27)

Fixed

  • Issue with emails

1.1.33

(2018-08-15)

Fixed

  • Solved issue with cronjob (order was removed)

1.1.32

(2018-07-30)

Fixed

  • Issue with adding new program

1.1.31

(2018-07-24)

Features

  • Ability to register affiliate from backend

Fixed

  • Issue with saving relations

1.1.30

(2018-05-23)

Fixed

  • Issue with magento 2.1

1.1.29

(2018-02-26)

Features

  • Docs Rewritten

Improvements

  • Affiliate information on order edit page

Fixed

  • Issue with tracking sales

1.1.28

(2018-02-08)

Improvements

  • Ability to add new transaction (for modify balance)

1.1.27

(2018-02-06)

Improvements

  • Ability to remove affiliates
  • Ability to enable/disable withdrawal payment methods

1.1.26

(2018-02-06)

Fixed

  • Issue with commission (on refund)

1.1.25

(2018-01-25)

Fixed

  • Issue with calculating sales even for admin
  • Fatal error during filter affiliates by column "Affiliate Since"

1.1.24

(2018-01-09)

Fixed

  • Issue with account listing

1.1.23

(2018-01-04)

Fixed

  • Issue with sale program

1.1.22

(2018-01-03)

Fixed

  • Issue with Review link

1.1.21

(2018-01-02)

Fixed

  • Auto sign up issue

1.1.20

(2018-01-02)

Fixed

  • Issue with Pay Per Click program

1.1.19

(2017-12-26)

Improvements

  • List of programs

1.1.18

(2017-12-26)

Fixed

  • Interface of assigning programs to affiliate

1.1.17

(2017-12-26)

Improvements

  • Added base statistic to affiliate account

1.1.16

(2017-12-20)

Fixed

  • Issue in AccountService.php

1.1.15

(2017-12-06)

Improvements

  • Translations

Fixed

  • Issue with banner images

1.1.14

(2017-11-20)

Improvements

  • System message about pending accounts/withdraws
  • Pending accounts

1.1.13

(2017-11-20)

Fixed

  • Issue with Sale program

1.1.12

(2017-11-13)

Fixed

  • Issue with hidden programs

1.1.11

(2017-11-09)

Fixed

  • Issues with removed customer
  • Setup issues

1.1.10

(2017-10-13)

Improvements

  • Ability to add referred customers to affiliate

1.1.9

(2017-09-27)

Fixed

  • M2.2

1.1.8

(2017-09-18)

Improvements

  • Ability to edit coupon code

1.1.7

(2017-09-11)

Fixed

  • Fixed an issue with payment email

1.1.6

(2017-09-01)

Improvements

  • Admin account interface

Fixed

  • Issue with program amounts

1.1.5

(2017-08-21)

Improvements

  • Withdrawal request email

1.1.4

(2017-08-21)

Fixed

  • Issue with emails

1.1.3

(2017-08-10)

Fixed

  • Removed old files

1.1.2

(2017-07-28)

Fixed

  • Event system

1.1.1

(2017-07-27)

Fixed

  • Issue with account saving

1.1.0

(2017-07-21)

Improvements

  • Commission assign priority
  • Tiers

1.0.10

(2017-06-02)

Fixed

  • Minor issue with program ids

1.0.8

(2017-05-31)

Improvements

  • Ability to change affiliate unique identifier, referral param
  • Ability to assign not visible programs to affiliate

Fixed

  • Issue with "clicks" registration

1.0.7

(2017-05-03)

Fixed

  • Possible issue with rendering
  • Changed calculation for commision type "by cart percent"

1.0.6

(2017-04-19)

Fixed

  • Issue with programs

1.0.5

(2017-04-18)

Fixed

  • Issue with email notifications

1.0.4

(2017-04-18)

Features

  • Ability to use order subtotal (cart) for commissions

1.0.3

(2017-04-12)

Improvements

  • Added option to set cookie lifetime
  • Ability to use coupons for refer friends

1.0.2

(2017-02-27)

Fixed

  • Fixed an issue with wrong permissions on media folder

1.0.1

(2016-10-18)

Improvements

  • Removed font awesome from styles

Fixed

  • Fixed an issue with account saving

Documentation

  • Affiliate base documentation

1.0.0

(2016-08-01)

Improvements

  • Added unique affiliate link to backend interface

Fixed

  • Fixed an issue with di compilation
  • Issue with withdrawal process
  • Issue with cron job
  • Fixed and issue with session