1. What this module does

A customer who has just paid is the easiest one to bring back. The module thanks every paid order with a personal discount code for the customer's next purchase, for example 10% off, valid for 30 days. The code is sent by e-mail in the customer's language, shown on the order confirmation page and in the order details of the customer account, and listed by PrestaShop under Vouchers in the account.

You decide when a code is given (the order statuses, a minimum order total, only the first order) and what it gives (a percentage or an amount, how long it is valid, a minimum cart, products on sale excluded or not, combinable with other vouchers or not). Every code is a standard PrestaShop voucher that only that customer can use, once.

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 the module 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 ap_nextordercoupon_v1.0.0.zip file and wait for the confirmation.
  4. Click Configure on the module card.

The module works right after installation: every order that reaches Payment accepted or Remote payment accepted gets a 10% code valid for 30 days.

3. How it works

When an order gets one of the ticked statuses for the first time, the module checks the conditions and creates the code: a voucher in Catalog → Discounts with the description ap_nextordercoupon #<order id>, restricted to the customer, usable once, highlighted in the cart. Each order gets one code at most, even when its status changes again later.

  • Paid orders only. Card and online payments usually set Payment accepted at once, so the code comes with the order confirmation. For bank transfers and cash on delivery the code comes when you change the status to a ticked one.
  • No chains. An order paid with a code from this module, or with nothing left to pay after vouchers, gets no new code.
  • Customers with an account. Guest checkout creates a new guest record for every order, so a code tied to a guest could never be used; guest orders get no code.
  • Cancelled later. A code already issued stays when the order is cancelled or refunded afterwards. Delete it in Catalog → Discounts if you want to.
  • Amounts (minimum order total, amount discount, minimum cart) are in the default currency of the shop, tax included. PrestaShop converts them for orders and carts in other currencies.

The e-mail goes through your shop's mail settings (Advanced Parameters → E-mail) in the language of the order. The module does not connect to addonspresta.com or any other server and sets no cookies.

4. Features and settings

Open Modules → Module Manager → Next Order Coupon → Configure. The Help box at the top links to this manual and to the module page at addonspresta.com, in the language of your Back Office.

When a code is issued

  • Issue codes — switch the module off without losing the settings; codes already issued keep working.
  • Order statuses that issue the code — default Payment accepted and Remote payment accepted. Tick Shipped or Delivered instead if you prefer to thank customers after delivery.
  • Minimum order total — tax included; 0 means every order.
  • Only for the customer's first order — customers who have already paid for an earlier order get no code, even when that order was cancelled later.
  • Send the code by e-mail — switch it off if you announce the code another way; it is still shown in the shop.

Discount

  • Discount type — Percentage of the products or Fixed amount.
  • Discount value — a percentage from 0.01 to 100, or an amount with tax in the default currency.
  • Valid for — from 1 to 3650 days; the code works until the end of the last day.
  • Minimum cart total to use the code — tax included; 0 means no minimum.
  • Not on products already on sale — the discount ignores products with a specific price or a catalog price rule.
  • Can be combined with other vouchers — when off, the code cannot be used together with another voucher.
  • Voucher name — per language, shown in the cart and under Vouchers. Default "Discount for your next order".
  • Code prefix — up to 10 letters, digits or hyphens before 8 random characters, for example NEXT-7KQ2M9XA.

Changes apply to the codes issued afterwards. To change a code already issued, edit it in Catalog → Discounts.

Issued codes

The panel lists the last 50 codes of the shops selected in the Back Office header: date, order (a link to it), customer, code, discount, valid until, status — Unused, Used, Expired or Deleted — and whether the e-mail was sent.

What the customer sees

  • An e-mail "Your discount code for your next order" with the code, the discount, the end date and the minimum cart.
  • The same information on the order confirmation page and in the order details of their account, while the code is valid and unused.
  • The voucher under Vouchers in their account and, as it is highlighted, in the cart.

5. Multistore

The settings are saved for the shop or shop group selected in the Back Office header. Select All shops to use the same rules everywhere, or one shop to give it its own statuses, discount and texts. A code is issued with the settings of the order's shop and works in that shop only. In the All shops or group context only an employee who manages every shop of that context can save, and the Issued codes panel lists only the shops the employee manages. One licence covers all shops of the installation.

6. Uninstall

Module Manager → Next Order Coupon → Uninstall deletes the module's settings and its list of issued codes. The codes themselves stay in Catalog → Discounts and keep working until they expire; delete them there if you want to. To keep the settings, use Disable instead.

7. FAQ and troubleshooting

An order got no code. Check that Issue codes is on, that the order reached one of the ticked statuses, that the customer has an account (not a guest order), that the order total reaches the minimum and, with Only for the customer's first order, that the customer had no earlier paid order. The Issued codes panel lists every code created.

The customer did not receive the e-mail. Check Send the code by e-mail and the shop's mail settings in Advanced Parameters → E-mail (the test e-mail there). The Issued codes panel shows whether the e-mail was sent. The code is also on the order confirmation and in the customer account.

The code is refused in the cart. The customer must be logged in to the account the code belongs to, the cart must reach the minimum total and the code must not be expired or used. With Not on products already on sale, a cart with only discounted products gets no discount; without Can be combined with other vouchers, remove the other voucher first.

Can I change the e-mail? Copy mails/<language>/ap_nextordercoupon.html and .txt from the module to themes/<your-theme>/modules/ap_nextordercoupon/mails/<language>/ and edit the copies.

A text stays in English in my Polish or French shop. Fill in the voucher name of that language in the module's configuration. The other texts are translated in International → Translations → Translations of installed modules.

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 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.

Back to User manuals

Loading...
Back to top