# DataFirefly Loyalty and Referral: points, tiers and referral program for PrestaShop

> Installation Install the module from Modules > Module Manager > Upload a module by sending the ZIP file, or copy the dfloyalty folder into the /modules/ directory of your shop…

- Page: <https://www.datafirefly.com/en/documentation/dfloyalty/>
- Language: en
- Last updated: 2026-10-11
- Other languages: [fr](https://www.datafirefly.com/documentation/dfloyalty/index.md), [es](https://www.datafirefly.com/es/documentation/dfloyalty/index.md), [de](https://www.datafirefly.com/de/documentation/dfloyalty/index.md), [it](https://www.datafirefly.com/it/documentation/dfloyalty/index.md), [nl](https://www.datafirefly.com/nl/documentation/dfloyalty/index.md), [pl](https://www.datafirefly.com/pl/documentation/dfloyalty/index.md), [pt](https://www.datafirefly.com/pt/documentation/dfloyalty/index.md)
- Index: <https://www.datafirefly.com/en/documentation/llms.txt>

## Installation

Install the module from **Modules > Module Manager > Upload a module** by sending the ZIP file, or copy the `dfloyalty` folder into the `/modules/` directory of your shop and click Install.

On installation, the module creates its tables, saves its default settings, creates four status tiers (Bronze, Silver, Gold, Platinum) and adds the **Customers > Loyalty & Referral** tab. The Configure button in the Module Manager opens the settings screen directly.

Start by choosing the **accent colour** in Settings > General. It colours the module buttons, progress bars and e-mails. The default is a dark green that may not match your brand.

## First settings

Settings are grouped in sections, reachable from the menu on the left. Before opening the program to customers, check at least the following:

- **Points per currency unit spent**: 1 by default, i.e. 1 point per euro. Decimals are allowed (0.5 = 1 point every 2 euros).
- **Order statuses that confirm the points**: payment accepted, shipped and delivered by default.
- **Conversion rate**: 100 points = 5 € by default. The box on the left shows live the percentage returned to customers once points are converted.
- **Referral rewards**: 10 € for the friend and 500 points for the referrer by default.

## Earning points

### Calculation

Points are calculated on the product lines of the order, in the customer currency and then converted into the default currency. Shipping never earns points. Three options adjust the base:

- **Calculate on prices tax included**: turn it off to calculate on prices tax excluded.
- **Deduct vouchers and discounts**: the order cart rules (except free shipping) are removed from the base proportionally.
- **No points on products already on sale**: products sold with a reduction are excluded.

The customer's tier multiplier and the product bonus points are applied next. The result is rounded down.

### Points life cycle

- When the order is validated, points are recorded as **pending**. Customers see them in their account but cannot use them.
- When the order reaches one of the statuses that confirm points, they become **available**.
- When the order moves to one of the statuses that cancel points, they are removed, pending or available.
- A **partial credit slip** removes the share of points matching the refunded product amount.
- If a cancelled order goes back to a confirming status, the points come back.

Every movement is written to a history that is never rewritten: a correction line is added instead of editing an existing one.

### Sign-up points

The **Points offered at sign-up** setting credits a fixed number of points for each customer account created (not for guest orders). Leave 0 to disable it.

## Status tiers

The **Tiers** tab lists tiers by threshold. Each tier has a translatable name and perks text, a threshold in status points, a points multiplier and a colour, used for the customer's member card.

**Status points** are the points earned, minus cancellations and refunds. Converting points into a voucher or letting them expire does not lower the status. The **Status period** setting limits the calculation to the last N months; leave 0 to count since registration.

The first tier should have a threshold of 0 so that every customer has a status from the first order. When a customer reaches a new tier, a congratulation message is shown on their next visit to the loyalty page.

The perks text is informative. To make a perk actually apply, link the tier to a customer group (see below).

### Tier customer group

In a tier form, the **Customer group of this tier** field links the tier to a PrestaShop group. The module adds customers who reach the tier to that group and removes them when they leave it. Set a group reduction on it (Customers > Groups), a free shipping cart rule restricted to the group, or specific prices: the perk applies with no manual work.

- Create a group dedicated to each tier. A customer added to that group by hand would be removed if they do not have the tier.
- The customer's default group is never changed.
- Synchronisation runs on every points movement, when a tier is saved, and every day with the scheduled task.

## Bonus points on products

The **Bonus products** tab gives more points on selected products. Search the product by name or reference, then choose:

- **Multiplier**: 2 doubles the points of this product.
- **Fixed points per item**: a number of points added for each unit, on top of the standard points.

Start and end dates are optional. Without dates, the bonus is permanent. The product page shows a badge (x2, +50) and the points to earn, recalculated when the customer changes the quantity. The bonus combines with the tier multiplier.

## Converting points into vouchers

### From the customer account

In the Rewards tab of the loyalty page, the customer picks with a slider how many points to convert, in multiples of the number of points of the conversion rate. They get a personal voucher with a `DFPTS-XXXXXXXX` code, shown in a window with a copy button and, if the option is on, sent by e-mail.

### Directly in the cart

When **Let customers use their points directly in the cart** is on, the loyalty block of the cart shows a slider. The voucher is created and applied to the cart in one click and cannot exceed the product total. Only one points voucher can be applied per cart from this block. Vouchers already generated and unused also appear with an Apply button.

### Voucher settings

- **Minimum points to convert**: below it, the customer sees a progress bar towards the first voucher.
- **Voucher validity**: in days, 365 by default.
- **Minimum cart to use it**: 0 for no minimum.
- **Combination with other cart rules**: turn it off if loyalty vouchers must not stack with your promo codes.

Vouchers are standard PrestaShop cart rules, visible in Catalog > Discounts, assigned to the customer and single use.

## Referral

### The referrer link

Each customer has a referral code and link (`?dfref=CODE` parameter on the home page), shown in the Referral tab of the loyalty page. They can copy the link, share it by WhatsApp, e-mail, Facebook or X, or through the native share of their phone, and send e-mail invitations from the form provided.

### The friend's arrival

A visitor who clicks the link is remembered for the duration set in **Link memory** (30 days by default). A discreet banner presents the gift, and a message accompanies the registration form. When the account is created, including during checkout:

- if the friend reward is an **amount** or a **percentage**, a code-free voucher is created and added automatically to the cart, with the minimum purchase and validity set;
- if it is a number of **points**, they are credited when the first order is validated.

### Code typed at registration

With **Add an optional referral code field to the registration form**, a friend who got the code by word of mouth can type it when creating the account. An unknown code is rejected with an error message. The field is not shown when the visitor already arrived through a referral link.

### The referrer reward

The referrer is rewarded when the friend's first order reaches a status that confirms points and its product total tax included reaches the **Minimum first order of the friend**. They receive points or a voucher with a `DFREF-XXXXXXXX` code, plus a thank-you e-mail.

### Protections

- A customer cannot refer themselves, nor with the same e-mail address.
- An e-mail address that has already ordered in the shop is not attached to a referrer.
- Only the friend's first validated order counts. If it is below the minimum, the referral becomes Not eligible.
- E-mail invitations are limited per customer per day, and the same address cannot be invited twice within 7 days.

### Referral statuses

**Invited**: e-mail sent by the customer. **Registered**: account created with the link. **Rewarded**: first order validated, rewards granted. **Not eligible**: first order below the minimum.

## Expiry and scheduled task

The **Expiry after inactivity** setting expires a customer's balance when no points were earned during the number of months set. Each order pushes the date back, and the customer sees it in their account. Leave 0 so that points never expire.

Expiry is applied when the customer opens the loyalty page and by the daily task whose URL is in Settings > Maintenance. Schedule it once a day in your cron manager or in a PrestaShop cron module. It also sends the expiry reminders, credits the birthday points and updates the tier groups. The **Run the daily task now** button in the Maintenance tab does the same thing.

The **Expiry reminder** setting (30 days by default) e-mails the customer their balance, its value and the expiry date. One reminder is sent per expiry date; if the customer orders in the meantime, the date moves and a new reminder will be sent in due course.

Add `&resync=1` to the URL to also replay the order statuses of the last 7 days.

## Birthday, newsletter and campaigns

### Birthday points

The **Birthday points** setting credits points once a year on the birth date entered in the customer account, with a greeting e-mail. They are awarded by the daily task, and also when the customer logs in or opens the loyalty page. Customers born on 29 February receive them on the 28th in non-leap years. By default, only customers who already have a validated order qualify, to avoid accounts created just for the gift.

The birth date field must be shown in the customer form: Shop Parameters > Customer Settings, option “Ask for birth date”.

### Newsletter subscription points

The **Newsletter subscription points** setting credits points once per customer: at registration if the newsletter box is ticked, when subscribing later from the account, or through the footer newsletter block for an address matching a customer account. Subscribers from before the option was enabled are not credited retroactively.

### Points campaigns

The **Points campaign** section multiplies all points earned between two dates: 2 for double points. The multiplier adds to the tier multiplier and product bonuses. During the campaign, a badge shows on product pages, in the cart block and on the loyalty page. The order date decides: an order placed during the campaign keeps its boosted points even if it is validated after the end.

## Excluding customer groups

In Settings > General, tick the **customer groups excluded from the program**, for example professional accounts or staff. A customer in one of these groups earns no points, sees neither the tile, the loyalty page nor the product and cart blocks, and their referral link earns no reward.

## What customers see

- **My account**: a tile with the program name and balance, and a link in the My account block of the footer.
- **Loyalty page**: member card in the tier colours, progress, Rewards, Referral, History and Statuses tabs.
- **Product page**: points to earn, value in money, bonus badge. Option **Show the points to earn on product pages**.
- **Cart**: points of the order, balance, points usage and available vouchers. Option **Show the points block in the cart**. The block updates on every cart change.
- **Order confirmation**: points earned, pending or already credited.

## Back office

### Dashboard

Points in circulation and their value (the liability represented by balances), pending points, number of members, points earned and converted over 30 days with a chart, members per tier, vouchers created and used, referral funnel, top referrers and recent activity.

### Members and member file

The **Members** tab lists customers with points, sorted by balance. Search covers name, e-mail, customer ID or referral code, and includes customers without points so you can credit them. The member file shows balance, tier, history, vouchers and referred friends, and allows a **manual adjustment**: enter a positive or negative number and a reason, which the customer will see in their history.

The native PrestaShop customer page also shows a panel with balance, tier, referral code and a link to the member file.

### Order page and exports

On an order page in the back office, a panel shows the order points and their state, the bonuses and multipliers applied, the loyalty vouchers used, and whether it is the first order of a referred customer. The Members tab offers two CSV exports: the member list (balance, tier, status points, referral code) and every points transaction. The files open directly in Excel or LibreOffice.

## E-mails

The module sends six e-mails in the recipient's language: a friend invitation, the friend's welcome gift, the referrer reward, the voucher created from points, the birthday greeting and the expiry reminder. They use a single template in the accent colour with the shop logo. Texts come from the module translations, the template is in `mails/`.

## Data and uninstallation

By default, **Keep balances and settings when the module is uninstalled** is on: uninstalling and reinstalling loses nothing. Turn it off before uninstalling if you want all data deleted. When a customer is deleted in PrestaShop, their points, recorded vouchers and referrals are deleted with them.

The module works with the official PrestaShop GDPR module: exporting a customer's data includes their points history and referral code, and deleting a customer from that module erases their loyalty data.

## Troubleshooting

### Points stay pending

Check that the current order status is ticked in **Order statuses that confirm the points**. If an employee changed the status and their profile lacks the View permission on the module (Advanced Parameters > Team > Permissions), PrestaShop did not run the module: use **Resynchronize the last 90 days of orders** in Settings > Maintenance. It can be run again without any risk of double credit.

### The loyalty block does not show in the cart

The block is displayed through the `displayShoppingCart` hook, present in the Classic theme. If your theme does not call it, add `{hook h='displayShoppingCart'}` to the cart template, or contact us with the theme name.

### The referral banner does not show

It is only shown to visitors who are not logged in and arrived through a valid link, and stays hidden for 3 days after being closed. Test in a private browsing window.

### Some texts stay in English

The module ships in 8 languages. For another language, or to change a text, use International > Translations > Installed modules translations.

## Compatibility

- PrestaShop 8.0 to 9.x, the same ZIP covers both branches.
- Multilingual and multi-currency. In multistore, a customer's balance is shared across shops.
- ModuleAdminController architecture, no Composer dependency.
- Module and e-mails translated into English, French, Spanish, German, Italian, Dutch, Polish and Portuguese.
