1. What this module does

Gift Cards lets you sell gift cards in your PrestaShop shop without a second voucher system next to the one you already have. You choose which products are gift cards. When an order with such a product is paid, every purchased unit becomes a native PrestaShop discount code worth the price of the product. A digital card reaches the buyer by e-mail as a PDF ready to print or forward; a physical card is printed by you from the order page and shipped with the parcel. The holder pays with the card by typing its code in the cart, like any voucher, and PrestaShop itself takes care of partial use, expiry and currencies.

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_giftcard_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 order statuses, the validity and the text about using the card, then save.
  5. In the Gift card products panel of the same page, find the products you sell as gift cards and add them.

Right after installation the module issues cards at the statuses Payment accepted and Remote payment accepted, valid for 365 days, with codes that start with GC. Nothing is issued until you add the first gift card product.

3. How it works

Gift card product. A gift card is an ordinary product of your catalogue that you added to the list on the configuration page. Its price is the value of the card. Stock, images, categories, combinations and customization fields stay normal product settings, so a card with several amounts or designs is simply a product with combinations.

Digital or physical. The product type decides. A virtual product is a digital card: an order that holds only virtual products needs no delivery, and the buyer gets the card by e-mail. Any other product is a physical card: the order goes through the normal delivery, you print the card and put it in the parcel.

Issuing. When an order gets one of the statuses you selected, every purchased unit of a gift card product becomes one card: three units of a 100 € card are three cards with three codes, so each can be given to someone else. A unit never gets a second card, whatever happens to the order later. The code looks like GC-7KQM-X2RD-9HTP: your prefix and twelve random characters, without look-alike characters such as 0 and O.

Value. A card is worth the price of the product, or of the purchased combination, tax included, in the currency of the order. Discounts on the purchase do not lower it: a 100 € card bought in a −20 % promotion or with a voucher is still worth 100 €. Two price settings do lower it, because they replace the price itself: a specific price with a fixed price and a customer group reduction.

One exception keeps a promotion from being multiplied: when an order is paid, even in part, with a gift card, every card bought in it is worth what was actually paid for it — its price after reductions, less its share of the other vouchers of the order — and never more than the price of the product. A 100 € card on sale at 80 € and paid with another gift card is worth 80 €.

The card as a voucher. Each card is a cart rule in Catalog → Discounts, named "Gift card": an amount including tax, valid until the end of the last day of the validity, usable once, with partial use, for anyone who has the code — logged in or guest. In multistore it works only in the shop of the order.

E-mail. For digital cards the buyer receives one e-mail with one PDF file for each card, so every card can be forwarded separately. The e-mail goes to the address of the order, guest orders included, in the language of the order (English, Polish or French; English for any other language). Physical cards send no e-mail.

PDF card. One A4 page with your shop logo, the image of the product or of the purchased combination, the value, the code, the expiry date, the dedication and your text about using the card. The dedication is whatever the buyer typed in the text customization fields of the product, for example "To", "From" and "Message".

Paying with a card. The holder types the code in the voucher field of the cart. The card pays for products; when the products cost less than the card, PrestaShop creates a new code for the amount left and e-mails it to the customer who placed the order. The module records which codes belong to which card and shows you the balance.

The module does not connect to addonspresta.com or to any other server, sets no cookie and stores no PDF file: cards are generated when somebody asks for them.

4. Features and settings

Open Modules → Module Manager → Gift Cards → Configure. The page shows the Help box, the settings, the gift card products and a short reminder of how PrestaShop vouchers behave.

Settings

Enable gift cards. Switched off, no new card is issued in any way, and the gift card information disappears from the storefront together with the PDF download. Cards already issued stay valid and you can still manage them.

Order statuses that issue gift cards. The cards of an order are issued the first time it gets one of the ticked statuses. At least one status must stay ticked. Keep to statuses that mean the money has arrived; add your own paid statuses, for example of a payment module, when you use them.

Validity (days from the issue date). From 1 to 3650 days, 365 by default. A change applies to cards issued from then on; cards issued earlier keep their date.

Code prefix. Up to 8 capital letters and digits placed at the start of every code, GC by default. It may be empty.

Show the gift card information on the product page. A short block on the page of a gift card product: how the card is delivered and how long it is valid.

Send a copy of gift card e-mails to. Optional address that gets a hidden copy of every e-mail with gift cards, PDF files included.

How to use the card (PDF and e-mail). Plain text for each language, up to 1000 characters, printed on the PDF and in the e-mail. {shop_name} and {shop_url} are replaced with the name and the address of the shop. A language left empty uses the text of the default language of the shop.

Gift card products

Type at least three characters of a product name or reference, or a product ID, pick the product from the results and click Add. An employee without access to Orders → Gift cards adds a product by typing its ID. Packs cannot be gift cards.

The list shows every gift card product with its type — Digital — PDF by e-mail or Physical — shipped — and the card value: the prices, tax included, of the product or of its combinations. Remove stops selling the product as a gift card; cards already issued stay valid.

Two notes may appear under a product. A product with a tax rule: the card is worth the price including tax. Gift cards are normally sold without tax, because the tax is paid when the card is spent; ask your accountant and set the tax rule of the product to match. A virtual product with a downloadable file: the customer also receives the PrestaShop download e-mail for that file, so leave the file empty.

When you add the first virtual product and the virtual products feature of the shop is off, the module switches it on; without it a cart with a digital card alone would still ask for delivery.

Good to know for digital cards: a virtual product follows the stock rules too. Give it a large quantity or allow orders when out of stock, otherwise it stops being sold when the stock reaches zero. For a dedication, add text customization fields to the product in its form.

Sample images. The module comes with three ready gift card images, 800 × 800 px, with English captions: gift-card-digital-50.jpg, gift-card-digital-100.jpg and gift-card-envelope.jpg in the folder views/img/samples/ of the module (in the zip you downloaded and in modules/ap_giftcard/ of your shop). Upload them as product images in the product form, or use them as a starting point for your own design. The module itself never uses them: the card always shows the image of the product.

Order page

Orders with gift cards get a Gift cards panel on the order page: product, type, code, value, balance, status and the e-mail date of every card.

  • PDF opens one card; Print all cards (PDF) opens every card of the order in one file, one card on each page. This is the way to prepare physical cards: print, put in the parcel, ship.
  • Issue now appears when the order has units without a card, for example after you raised a quantity or when you want to issue cards of an order paid in another way. It works whatever the status of the order.
  • Resend e-mail sends the e-mail with the digital card again. "Not sent" in the e-mail column means the shop could not send the message; check the e-mail settings of the shop and resend.
  • When the order is cancelled or refunded while its cards are still valid, the panel shows a warning. The module never cancels a card on its own: click Deactivate when the card must not be used.
  • When a gift card that paid for the order was also used for another order, no card is issued on its own and the panel lists those orders. This can happen when two orders are placed with one code at the same moment. Check which order the card really paid for, then click Issue now if the cards should be issued.
  • When one cart was turned into more than one order, no card is issued on its own either and the panel lists the other orders. This can happen when the customer confirms the same order twice at the same moment, or when a payment module reports one payment twice. Keep one order, cancel the others, then click Issue now on the order you keep.

Orders → Gift cards

The list of every issued card: code, type, value, balance, order, customer, issue date, expiry date, status and the e-mail date. You can filter by code, type, order reference, customer e-mail, issue date and status, and export the list to CSV. The code filter also finds a card by a code created after a partial use.

Statuses: Active (nothing spent), Partly used, Used, Expired, Deactivated (switched off by you) and Voucher deleted (its cart rule was removed in Catalog → Discounts).

View opens the card page: the code printed on the card and the current code, value and balance, dates, order, customer, product and dedication, then Codes of this card — each partial use replaces the code with a new one — and Orders paid with this card. Deactivate blocks the current code until you click Reactivate; the amount is not lost.

The cart rule of a card stays an ordinary cart rule: you may extend its date or change it in Catalog → Discounts, and the list shows the new state at once.

What the customer sees

  • Product page: the information block of the card, when you keep it switched on.
  • Order confirmation: one sentence saying that the card will be e-mailed after the payment, that it has been sent, or that it will be shipped with the order. A code is never shown there.
  • Order details in the customer account and on the guest tracking page: the Gift cards block. For a digital card it shows the value, the code, the expiry date, the status and Download PDF, available as long as nothing has been spent from the card. For a physical card it shows only "Shipped with your order": the code travels in the parcel. On the guest tracking page the code and the download appear only for orders placed without an account; for the order of a registered customer the page asks to log in first.

Permissions

The configuration page needs the Configure permission of the module, the panel on the order page its View permission. The list Orders → Gift cards follows the permissions of that menu entry in Advanced Parameters → Team: View for the list, the card page and the PDF, Edit for issuing, resending, deactivating and reactivating.

5. Multistore

Settings and gift card products are saved for the shop selected in the Back Office header: every shop may sell other cards, with its own statuses, validity, prefix and texts, or have the module switched off. In the All shops context a product is added in every shop it belongs to. A card belongs to the shop of its order and its code works only in that shop. The list and the order page show only cards of the shops you manage. One licence covers every shop of the installation.

6. Uninstall

Module Manager → Gift Cards → Uninstall removes the settings, the list of gift card products and the list of issued cards with their PDF. The discount codes of issued cards stay in Catalog → Discounts and remain valid: they are money your customers paid. To stop selling cards without losing anything, switch off Enable gift cards or use Disable.

7. FAQ and troubleshooting

An order is paid but no card was issued. Check that the module is enabled in this shop, that the product is on the list of gift card products of this shop and that the status of the order is one of the ticked statuses. Then click Issue now on the order page.

The customer did not get the e-mail. Only digital cards send an e-mail. Look at the e-mail column: with "Not sent", check the e-mail settings of the shop and click Resend e-mail. The customer also finds the card in the order details.

The card did not pay for shipping. PrestaShop limits an amount voucher to the products of the cart, so shipping is paid separately and is not taken from the card.

The customer spent a part of the card and the code no longer works. After a partial use PrestaShop replaces the code with a new one for the amount left, for example GC-7KQM-X2RD-9HTP-2, and e-mails it to the customer who placed the order. The new code is tied to the account of that customer. You find it on the card page as the current code.

No code was created for the amount left. PrestaShop creates none when one cart is split into several orders, for example with several warehouses. Create a voucher for the difference in Catalog → Discounts. The module treats every voucher whose code is a gift card code followed by a hyphen and a number as credit of that card, also one you create by hand. Do not give such a code to an ordinary voucher.

An order paid with a card was cancelled. How does the customer get the amount back? PrestaShop does not give it back on its own. Open the code in Catalog → Discounts and enable it again or raise its quantity. The same applies to an order created with the status Payment error or Canceled: the card is used for it as for any other order.

Can a voucher be used to buy a gift card, or a gift card to buy another one? Yes, the module does not block either. A card bought in an order paid with a gift card is worth what was paid for it (see Value), so a promotion on gift cards cannot be turned into extra credit by buying cards with cards. To keep a promotion code away from gift cards, put the gift cards in a category of their own, select the categories the promotion is meant for in the Conditions tab of the cart rule, and apply the discount to the selected products in its Actions tab.

The card is worth less than the catalogue price. The customer bought it with a fixed-price specific price or with a customer group reduction. Both replace the price of the product, and the card follows the price.

The customer cannot download the PDF. The download is offered for a digital card that is still Active, to its buyer: logged in, or through the guest tracking page when the order was placed without an account. You can always open the PDF from the Back Office and send it yourself.

I want another look for the PDF or the e-mail. The card takes the image of the product, so change the image there. The templates can be overridden from your theme; README.md in the module folder lists them.

A text is still in English. The module is translated into English, Polish and French. For another language open International → Translations → Installed module translations and translate the texts of the module, translate its e-mail under Email translations on the same page, and type the text about using the card on the configuration page. Until the e-mail is translated, orders in that language get the English e-mail.

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, gift card products and issued cards 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