Gift cards in Maho: selling them, sending them, taking them
Since 26.1 a gift card is a core product type: create it in the admin, send it by email with a QR, redeem it at checkout even in part.
A gift card is the easiest product to sell and the hardest to keep tidy: a code, a balance, an expiration date, a recipient who is not the person paying, and a refund that has to go back to the card instead of to a bank account. Until 26.1 that meant a third party extension to install, configure and keep aligned with every upgrade. Since 26.1 a gift card is a product type in the Maho core, with its own admin screens and its own piece of the checkout.
This guide is about the work of whoever runs the store: turning the feature on, creating the product, following the sale, the redemption and the refund. The module code is not required reading.
Turning gift cards on
Start from System > Configuration > Sales > Gift Cards. The settings that matter, with the scope each one acts on:
| Setting | What it does | Scope |
|---|---|---|
| Enable Gift Cards | turns the feature on or off | Website |
| Code Length | characters in a generated code, 16 by default | Global |
| Code Prefix | a prefix shared by every code, such as GC |
Global |
| Default Expiry (days) | days before expiration, 0 means no expiration |
Store View |
| Refund Expiration Extension (days) | days added to the expiration when a refund lands on a card that expired or is about to, 30 by default, 0 disables it |
Store View |
| Allow Gift Message | a personal message attached to the gift | Store View |
| Show QR Code | prints the QR on the card and in the email | Store View |
| Show Barcode | shows the Code128 barcode | Store View |
The same group holds the notification email template and the sender identity. The QR and the barcode need no external service: Maho draws them, so the card PDF still works on a server with no outgoing network.
🎁 Packing note: the QR is not decoration. It is what turns a sixteen character code into something you can print and have read at the counter of a physical shop.
Creating the gift card product
A gift card is not a coupon, it is a product, and it is created as one.
- Go to Catalog > Manage Products and press Add Product.
- Pick the Gift Card product type.
- In the Gift Card tab decide how the amount is chosen:
- Fixed Amount(s): the customer picks from a list, for example
25,50,100,250; - Custom Amount: the customer types a figure between a minimum and a maximum;
- Combined: both routes.
- Fixed Amount(s): the customer picks from a list, for example
- If the product has to behave differently from the rest of the catalog, override the lifetime and the message option here: every field carries Use Config to inherit the system value.
- Set Price to the lowest available amount, because that is what the storefront shows as “from”, and pick the Tax Class that fits how gift cards are taxed where you sell.
Everything else is a normal product: status, visibility, websites, tax. Quantity is managed like any other item.
How the customer buys it
Once in the cart, the gift card asks for four things: the amount, the name and email of the person receiving it, the name of the person sending it and, when enabled, a message. There is also a delivery date: leave it empty and the email goes out immediately, fill it and the email leaves that day, with a cron job handling the scheduled ones.
In the cart the gift card is a line of its own, with recipient and date. It is a gift, so it does not count toward shipping like a physical product.
🎁 Packing note: the delivery date is the only field in this guide that depends on cron. If the server never runs it, scheduled gifts sit in the queue. Everything else works regardless.
How it is redeemed
The code goes in two places: the cart totals and the payment step of the checkout. In both cases the card appears in the applied list with its balance and a button to take it off.
Three rules apply.
- Partial redemption: if the card is worth more than the order, only what is needed is taken and the rest stays on the card for next time.
- Several cards on one order: an order can use more than one code.
- Full coverage: when the cards cover the whole total, Maho switches on the “Free” payment method by itself. The card is not a payment method, it is an advance payment that lowers the amount due, so the order closes without asking the customer for anything else.
The balance, without emptying the cart
Whoever holds a card wants to know what it is worth before buying. The cart page has a balance check that does not require applying the code to an order: type the code, read the balance and the expiry date. Requests are capped at ten per minute, because a free form answering “no such code” or “zero balance” is also a way to learn which codes exist.
The admin side
Two grids, under Sales > Gift Cards:
- Manage Gift Cards: code, status (Active, Used, Expired, Disabled), balance, initial balance, expiration, creation date. From the grid you open the card, delete in bulk, change status in bulk, print the PDF and resend the notification email.
- Gift Card History: every transaction, with the balance before and after and the comment left by the operator.
Cards can also be created by hand, with no sale behind them: Add New Gift Card, leave the code empty to have it generated, then balance, recipient, expiration and an internal comment. That is the route for prizes, replacements and refunds a customer wants to keep in the shop.
🎁 Packing note: the code may be left empty but it cannot be changed after saving. If you are importing cards bought elsewhere, check the code before pressing Save.
Refunds and expiration
A refund can go back onto the card that paid the order, and the balance grows with a line in the history. If the card has expired in the meantime, Refund Expiration Extension gives it a margin of days, so the customer does not end up with a code they cannot use. Expiration itself is handled by the module cron, which moves cards to Expired.
How it fits with the rest
Gift cards and coupons live together without overlapping: a coupon discounts, a card pays. Invoices and credit memos carry the gift card total on its own line, and the order keeps the code that was used, so rebuilding a refund does not mean searching somewhere else.
If the store sells online and over a counter, the PDF with QR and barcode is the part to print: the code is the same, the channel is what changes.
🎁 Packing note: a card that is never spent is revenue already collected. That is not an accounting mistake, it is the reason gift cards are popular with whoever holds the till.
Text prepared with the help of AI and checked against the source before publication. It can still contain mistakes: if you find one, report it.Read the manifesto
Does your store still sell?
Tell us where you are starting from: we reply with a first assessment, no strings attached.
Ask for the store assessment