DataFirefly Affiliate Program: affiliate program for PrestaShop
Install, configure and run the affiliate program: dashboard, link tracking, commissions with a holding period, rules and simulator, SEPA or PayPal statements, affiliate area and promotional material.
Installation and update
Install the module from Modules > Module Manager > Upload a module by sending the ZIP file. The same ZIP works on PrestaShop 1.7.8, 8 and 9.
On installation, the module creates its tables and default settings, and adds the Sell > Affiliation menu with seven entries: Dashboard, Affiliates, Commissions, Statements and payouts, Commission rules, Promotional material and Settings. A shared menu at the top of each page lets you move from one to another.
To update from version 1.0.0 or 1.1.0 to 2.0.0, simply upload the new ZIP. The upgrade script keeps the affiliates, links, clicks, commissions, statements, rules and settings, and adds what is new:
- IBANs already saved are encrypted;
- commissions still within their delay move to the “Holding period” stage;
- new settings receive their default value.
Before opening the program, check in Settings the order state(s) that confirm the payment, the holding period and the minimum payout. The Dashboard then shows a setup check that points out what is missing.
Dashboard

The dashboard summarizes activity over 7 days, 30 days, 90 days or 12 months:
- KPIs: clicks and unique visitors, attributed orders and click conversion, revenue generated (commission base of the orders, without shipping), commissions earned and their share of revenue, commissions to pay, active affiliates, orders refused as own orders or double rewards.
- Chart of clicks and revenue per day, or per month over 12 months.
- Where the commissions are: awaiting order payment, in the holding period, payable, on statements to pay, paid.
- To do: applications to review, pending commissions, statements to create or to pay, affiliates without payment details, each with a button that opens the right list.
- Setup check, top affiliates, most clicked links and latest commissions.
Tracking and attribution
Tracking links
Each affiliate has a code. Two types of links carry it:
- the URL parameter, added to any shop address:
?aff=CODE. The parameter name can be changed in the settings; - the short links
/go/…that the affiliate creates in their area. They redirect to the chosen page and count clicks and orders per link. Only shop addresses are accepted: a link can never redirect to another site.
The attribution cookie
On click, the dfaff_ref cookie records the affiliate. It is signed (a visitor cannot change it), HttpOnly and SameSite=Lax, and its lifetime is set in the settings or per affiliate. The attribution is also copied to the cart, which covers payments confirmed later by the bank.
Never counted:
- robots and link previews from social networks and messaging apps;
- browser prefetching and HEAD requests;
- clicks by the affiliate themselves;
- reloads and repeated clicks by the same visitor on the same link within the chosen window (30 minutes by default).

Cookie and consent
The Attribution cookie and consent setting offers two behaviors:
- Write the cookie on every tracked visit;
- Wait for the consent of the visitor: the cookie is only written if your consent banner’s cookie is present and contains the specified text, for example
tarteaucitronanddfaffiliate=true. Without consent, the click is still counted in the statistics, but only an affiliate voucher code can attribute the order.
The regulatory status of this cookie depends on your country and on how you use it: have it reviewed by your adviser. The module does not guarantee any compliance.
Order attribution priority
- The personal voucher code of an affiliate used in the order, even without a click.
- The link or cookie.
- A customer already brought by this affiliate, if returning customer commissions are enabled.
The attribution model decides what happens when a visitor clicks the links of two affiliates: last click (default), the last affiliate visited wins; first click, the first affiliate keeps the sale until the cookie expires.
Commissions
Commission lifecycle

- Awaiting order payment: the order has been placed. An order paid by bank transfer or cheque stays at this stage until you confirm the payment.
- Holding period: the order reaches a state that confirms the payment. The commission waits for the chosen number of days (30 by default) to cover the withdrawal period and returns. The end date is displayed.
- Payable: the period is over, the commission will be included in the next statement.
- On a statement, then Paid when you mark the statement as paid.
Holding periods end on their own: through the cron task if you use it, otherwise as soon as the module’s back office or the affiliate area is opened.
Special cases:
- Cancelled or refunded order: the commission is rejected as long as it has not been paid. If the order is later paid again, the commission comes back with a new holding period.
- Partial refund (credit slip): the commission is reduced pro rata to the refunded products.
- After payment: the module no longer changes the paid commission and creates a negative adjustment, deducted from the next statement. A second change of state does not create a new deduction.
- Only one commission per order: reloading the confirmation page, receiving two payment notifications or going through the same state several times never creates a duplicate (lock and unique key in the database).
In the commission list, the bulk action Approve now ends the holding period of the selected commissions. It refuses orders that are not paid yet and shows their reference.
Calculation
- Base: products tax excluded or tax included (your choice), never shipping.
- Vouchers: deducted pro rata on each line if the option is enabled. A free shipping voucher is not deducted.
- Currencies: orders placed in another currency are converted with the rate stored on the order.
- Rounding: only once per order, to the cent.
- Fixed amount: one commission per order, only one even when PrestaShop splits a cart into several orders.
- Returning customers: for the chosen number of days, later orders of a customer brought by the affiliate earn a commission, at the affiliate’s rate or at a specific rate.
No amount comes from the browser: everything is recalculated from the order saved by PrestaShop.
Commission rules and simulator

A rule sets a rate for a category or a product, for all affiliates or for a single one. For each order line, the priority is as follows:
- product rule;
- rule of the product’s default category;
- best rule among the other categories;
- affiliate or program rate.
A rule reserved for one affiliate takes precedence over the same rule for all. A rule can replace the rate (a rule at 0 % excludes the products) or add to it: an affiliate at 10 % with a “+2” rule earns 12 %, capped at 100 %. Rules do not apply to fixed amounts.
The rule simulator, at the top of the rules page, answers the question “which rate applies, and why?” for a product and an affiliate, or replays an existing order line by line, without creating anything.
Manual commissions
Add a manual commission credits or debits an affiliate (negative amount for a deduction), with a note visible in their area.
Fraud and double rewards

- An order placed with the same customer account, the same email address or, if the option is enabled, delivered or invoiced to an address of the affiliate is recorded as rejected, with a reason readable by the merchant and the affiliate.
- With the DataFirefly Loyalty & Referral module active, an order that already rewards a sponsor earns no affiliate commission (configurable setting). The referral module’s data is only read, never modified. The two modules use different URL parameters and cookies.
- New customers only and Minimum order amount complete these protections.
Affiliates
Applications

The public program page presents your conditions (rate, cookie duration, holding period, minimum payout), the steps and a FAQ generated from your settings. The presentation text can be edited in each language.

The applicant must be logged in to a customer account. They state where they publish and describe their audience. If a CMS terms page is selected, they must accept it. By default, each application waits for your approval and the notification address receives an email.
Affiliate list and sheet

The list shows the code, channel, status, clicks, orders and balances. Bulk actions approve, reject or suspend several applications at once. The CSV export neutralizes cells that a spreadsheet could read as formulas.

The affiliate sheet brings together on one page:
- the profile, with the Approve, Reject, Suspend and Edit buttons;
- the KPIs and the balance per stage;
- the conditions (rate, own rules, cookie, voucher code) and the tracking link;
- the payment details, with the IBAN masked;
- the application;
- the links of the last 30 days, the latest commissions and the statements.
The Personal data block exports in JSON what the module stores about the affiliate. It also lets you anonymise them: name, email, website, payment details, links and clicks are erased, and commissions and statements remain for your accounting.
In the edit form, the IBAN is never shown again in clear text: leave the field empty to keep the saved one, or enter a new one.
What the affiliate sees

The affiliate area opens on a header that shows their code, rate and balances (in validation, payable, paid), followed by six tabs. It works with the Classic and Hummingbird themes.
- Overview: link generator, KPIs, chart of the last 30 days, conditions and recent links.
- Link generator: creation of a short link to any shop page, list of links with clicks, orders, copy and delete.
- Statistics: clicks, orders, conversion, sales and commissions over 7 days to 12 months, click sources and performance by link.
- Commissions: stage of each commission, expected payout date, masked order reference. No customer data is displayed.
- Payments: monthly statements to view and print, choice of SEPA bank transfer or PayPal, IBAN checked against its check digits, encrypted and shown masked, sale emails.
- Promotional material: ready-to-use banners and texts, with the affiliate’s tracking link already included.




An affiliate only sees their own data: their links, commissions and statements are checked on every display, and forms are protected by a token.
Promotional material

In Promotional material, add banners (JPG, PNG, GIF or WebP, 2 MB maximum) and ready-to-use texts, with a name and an alternative text in each language, and the shop page they lead to. The order is set by drag and drop.

Each affiliate copies the banner’s HTML code, the text and the link, with their tracking link already included. The tab only appears in the affiliate area if there is at least one active item.
Statements and payouts

Payment is done in four steps, recalled at the top of the page:
- Create the statements: choose the month, preview the amounts per affiliate, then create the statements. A statement groups the payable commissions created before the end of the month and the negative adjustments. Below the minimum payout, the balance is carried over.
- Export the payment file: select the statements, then the bulk action Export SEPA transfer file (XML) (pain.001.001.03) or Export PayPal Payouts file (CSV). The accounting CSV export gives the IBAN masked.
- Pay in your bank or PayPal: the module never sends money.
- Mark as paid, with the reference and date of the transfer.

A paid statement can no longer be exported or paid a second time. A payment export is refused entirely if a selected statement is already paid or if details are missing: the message names the affiliate concerned and says where to complete them.
Cron task (optional)
The cron URL is given in the settings. It ends holding periods and, if the option is enabled, creates the statements of the previous month between the 1st and the 5th of the month. It is protected by a token, never runs twice at the same time and never pays anything.
Emails
The module sends four emails, translated into 8 languages and sent in the recipient’s language, subject and amounts included: new application (to the merchant), affiliate account activated, new sale and statement available.


The new sale email gives the commission, the order amount and the rate, never the customer’s details. Each affiliate can turn it off. The templates are in the module’s mails/ folder.
Settings
The settings page is organized in five blocks:
- Tracking and attribution: URL parameter, cookie lifetime, attribution model, repeated-click window, consent, returning customers.
- Commissions: default type and rate, base tax excluded or tax included, voucher deduction, new customers only, minimum order amount, order states that confirm the payment or reject the commission, holding period.
- Fraud and double rewards.
- Statements and payouts: minimum payout, statements by cron, company SEPA details.
- Applications and program page: automatic approval, emails, program presentation, terms page, accent color.
Error messages say what to correct, for example “Company IBAN: the check digits do not match”.
GDPR
The module registers with PrestaShop’s official GDPR module. Exporting a customer’s data includes their affiliate profile and commissions, with the IBAN masked. Erasure anonymises the affiliate while keeping the commissions and statements. The same actions are available from the affiliate sheet. These tools help you handle requests, without constituting a guarantee of compliance.
Troubleshooting
No click is counted
Test in a private browsing window, without being logged in with the affiliate’s account. Automated browsers are filtered as robots. With the “wait for consent” option, first accept the service in your banner. If your shop uses a full-page cache, use the /go/ short links, which always go through PrestaShop.
A commission stays “Awaiting order payment”
Check that the current state of the order is ticked in Order paid on. An order paid by bank transfer or cheque stays pending until you have confirmed the payment.
The SEPA export is refused
Read the message displayed: it shows the statement already paid or the affiliate whose IBAN is missing. Also check the company name and IBAN, and that the euro is the default currency.
Compatibility
- PrestaShop 1.7.8, 8 and 9: the same ZIP covers all three branches, with the Classic and Hummingbird themes.
- Multistore: affiliates, commissions and statistics filtered by shop. Multicurrency: conversion at the order’s rate.
- Module and emails in English, French, Spanish, German, Italian, Dutch, Polish and Portuguese.