1. What this module does

Referral Program turns your customers into ambassadors of your PrestaShop shop. Every customer gets a personal referral link in My account. A friend who opens the link and creates an account, or orders as a guest, becomes their referred friend for good, and every order of that friend earns the customer points: a commission you set as a percentage of the order. Points become available once the order has the status you choose and the return period has passed, and the customer exchanges them for a personal discount code whenever they like.

Works with PrestaShop 1.7.8, 8.x and 9.x (PHP 7.2.5 or newer), with the Classic and Hummingbird themes and with multistore.

2. Installation

  1. Download ap_referral_v1.0.0.zip from My account → Order history at addonspresta.com.
  2. In your Back Office, open Modules → Module Manager and click Upload a module.
  3. Drop the zip file and wait for the confirmation.
  4. Click Configure, check the commission, the rate, the order statuses and the program description, and save.

The program is on right after installation with a commission of 5%, 10 points for 1 unit of your default currency, points awarded at Delivered and a waiting period of 30 days.

3. How it works

The link. In My account → Referral program the customer finds a link such as https://yourshop.com/?ref=K7P2QX9M with a Copy button. Any page of the shop with their code works. On the product page, a Copy my referral link button copies the link to that product with the customer's code; the link itself is not shown there.

The referred friend. When a visitor opens the link, the module remembers the code in its own cookie for the number of days you set (30 by default); a later link of another customer replaces it. When the visitor then creates an account or places an order as a guest, they become the referred friend of the link's owner. This happens only once and only for new customers: there must be no earlier order with the same e-mail address, and nobody can refer themselves — also not with another form of their own address (name+shop@…, dots in a Gmail address). In multistore, the friend must register in a shop that shares customers with the referrer's shop.

Points of an order. Every order of the referred friend is recorded for the referrer as pending, with order total × commission × rate points, rounded down. The total includes tax and shipping and comes after discounts; an order in another currency is converted to your default currency. Example: commission 5%, rate 10 — an order of 200 earns 10 in commission, that is 100 points, worth a discount of 10.

Approval. When the order gets one of the statuses that award points (Delivered by default), the points are approved and recomputed from the order as it is then. They become available when the waiting period has passed, counted from the order date. A status that cancels points (Canceled, Refunded, Payment error by default) cancels them while they wait; after the waiting period approved points are final, so a balance never goes below zero. No cron job is needed: the balance is computed every time it is shown.

Discount code. When the customer has at least the minimum number of available points, they click Generate my discount code; the page shows the value and the end of validity beforehand. All available points are exchanged for one code worth points ÷ rate in your default currency, tax included, valid for the number of days you set. The code works only for that customer, once, in your shop; if the order is smaller than the code, PrestaShop gives the rest as a new code. The code is listed on the program page and offered in the cart.

The module does not connect to addonspresta.com or any other server. The referrer never sees the names or the orders of the friends, only dates and points.

4. Features and settings

Settings (Modules → Module Manager → Configure)

The page starts with the Help box: this manual, the module page, contact and version.

Referral program

  • Enable the referral program — switched off, customers no longer see the program and new orders earn no points; referrals and points are kept.
  • Program description — per language, with the text editor; shown at the top of the program page. A starting text is filled in at installation; explain your own rules there.
  • Remember the referral link for — 1 to 365 days.

Points

  • Commission — percentage of the order total, 0.01 to 100.
  • Points for 1 unit of the default currency — 1 to 10,000. The same rate turns the commission into points and the points into a discount.
  • Statuses that award points — at least one.
  • Statuses that cancel points — a status cannot both award and cancel.
  • Waiting period — 0 to 365 days after the order date (30 by default). It must cover your delivery time and your return period (in the EU 14 days from delivery): a warning appears below 30 days.
  • Count orders of a referred friend for — months after the referral, 0 for no limit.

Discount codes and display

  • Minimum points for a discount code — 0 lets the customer exchange any positive balance.
  • Validity of a discount code — 1 to 3650 days from the creation of the code (365 by default); the customer does not choose it.
  • Show points on the product page — "Recommend this product: … you get about N points".
  • Show the referral link button on the product page — a Copy my referral link button for logged-in customers; the link itself is not shown. Visitors who are not logged in get a link to the program.
  • Show points in the cart — how many points an order like this cart would bring; the number follows changes of quantity.

Referral program page

Customers see their link, the number of referred friends, available and pending points with their value, the form to get a discount code, their codes (used, expired or valid) and the orders of their friends with the status of the points.

Customer page

Customers → Customers → View shows the Referral program card: the customer's code, who referred them, the friends they referred (with links to their pages) and the available, pending and exchanged points per shop. Employees see it for customers of the shops they manage, with the View right on the module (Advanced Parameters → Team → Permissions).

5. Multistore

Settings are saved per shop: choose the shop in the Back Office header before saving. Each shop can have its own commission, statuses, texts and limits, or switch the program off. Points belong to the shop where the friend ordered, the balance on the program page is the one of the current shop, and discount codes are restricted to that shop. A customer keeps one referral code and one referrer for all shops; a friend can only be referred in a shop that shares customers with the referrer's shop. The card on the customer page shows only customers of the shops you manage. One licence covers every shop of the installation.

6. Uninstall

Module Manager → Referral Program → Uninstall removes the referrals, the points and the settings. Discount codes already given stay valid in Catalog → Discounts. To pause the program without losing anything, switch off Enable the referral program or use Disable.

7. FAQ and troubleshooting

A friend registered through the link but is not referred. They must open the link before creating the account, in the same browser, within the number of days you set. An address that already ordered in the shop, or the referrer's own address, is not a new customer.

Points stay pending. They wait for one of the statuses that award points, then for the waiting period. The program page shows the date from which they will be available.

The order was refunded after the points became available. After the waiting period points are final. Set the waiting period longer than your delivery time plus your return period. A refund with a credit slip before the end of the waiting period lowers the points of the order. A refund made only as a voucher, without a credit slip, does not change them.

Can a customer refer their own second account? Orders delivered or invoiced to one of the referrer's own addresses, or with one of their phone numbers, earn no points, and another form of the same e-mail address is not accepted. With a different e-mail, address and phone it is still possible; the customer page shows who referred whom, so you can spot it.

Do I have to mention the cookie? Yes: the module sets its own cookie after a visit through a referral link. Add it to your cookie policy.

The Referral program link is missing in My account. Check that the program is enabled for this shop and that the theme shows the displayCustomerAccount hook.

8. Updates and support

Updates are free for life: download new versions from My account → Order history at addonspresta.com and upload them like a new module. Your settings, referrals and points are kept.

Support is included for 12 months from your order: write to mail@addonspresta.com or use the contact form at addonspresta.com (Monday to Friday, 10:00–16:00 CET; we usually answer within 2 business days). Please include your PrestaShop version, the module version and the steps that lead to the problem.

The module's code passes our AI-assisted security audit.

Back to User manuals

Loading...
Back to top