Troubleshooting¶
What goes wrong once Gift Cards is running, and what it means.
If Gift Cards will not open at all (a blank page, or a bounce back to the dashboard), that is an install problem rather than a Gift Cards one. See troubleshooting an install.
Installing it did nothing¶
Check your OpenCart version first. Gift Cards refuses to install on 4.1.0.0 and above, because OpenCart removed gift vouchers in that release. The refusal is recorded in the store's log with the reason, and nothing else happens.
If you are on 4.0.2.x and it still did nothing, there are three other refusals, each also in the log:
- A user group without modify on
extension/module. - An OpenCart older than 4.0.2.0, the oldest release it has been tested on.
- A PHP below the minimum. OpenCart still says Success; see requirements for the version and where the line is written.
Cards are not getting an expiry date¶
In order of likelihood:
- The validity period is still
0. That is where it ships, and it means no expiry at all. Extensions → Extensions → Modules → Gift Cards → Edit. - The order has not reached a completed status. The date is written when the order first reaches one, and paid is not the same thing. Check Settings → Option → Checkout → Complete Order Status to see which statuses count.
- The card was issued by hand. A voucher created in Sales → Gift Vouchers has no purchasing order, so it never gets a generated date. The Add form suggests one from the period, and a date cleared from that box before saving is a card with no date. Type one on the voucher.
- The card was sold before you set the period. Nothing reaches backwards.
- The extension was removed when the order completed. Switched off still dates cards; removed does not.
A card that got no date is a card that never expires. It is not broken, and it will keep redeeming.
A card that should work is being refused at checkout¶
Work through it in this order. Only the second is this extension.
- The purchasing order is not at a completed status. OpenCart itself refuses the card. Refunds, reopened orders and cancellations all do this, and putting the status back undoes it.
- The card has expired. Gift Cards is refusing it. The balance is untouched; extend the date on the voucher if you decide to honour it.
- The card is switched off, on OpenCart's own voucher form.
- The order line that sold it was edited away. See below.
A card went back to its full value on its own¶
Somebody, possibly you, edited the order that sold it.
OpenCart rebuilds an order's voucher rows when the order is edited, with new identifiers, and the spending history stays attached to the old ones. The card comes back unspent, and its expiry date is gone with the old identifier.
This is OpenCart's own behaviour on the 4.0.x line and happens with no extensions installed. Gift Cards cannot prevent it. Correct the amount and the date by hand in Sales → Gift Vouchers, and see the full explanation before editing such an order again.
The balance page says Not Found¶
The lookup is switched off on the settings screen, or the module itself is. Both make the page return Not Found rather than an error, so there is nothing in the log.
The balance page refuses a code you know is right¶
It gives the same sentence for every refusal, deliberately, so the message will not tell you which of these it is:
- The address being entered is the buyer's, not the recipient's. The page challenges on the address the card was sent to. This is by far the most common cause, and it is the one your customer is least likely to work out.
- The card is switched off on OpenCart's voucher form.
- Too many attempts have been made recently, from that address or against that card. The limits are fixed and not configurable; wait for the window to pass. Both limits and the window are on settings.
- The code does not exist.
Check the card yourself in Sales → Gift Vouchers. You can see all four things there; the page does not tell them apart, on purpose.
An expired card is not one of these. The balance page deliberately still answers for an expired card, showing the balance and saying it can no longer be spent. A holder whose card has expired is the person who most needs the page to work.
The liability figure looks too high¶
Read the breakdown rather than the headline alone.
- Expired cards are inside the figure. So are cards you switched off. Neither gives the money back, so neither reduces what you owe.
- Hand-issued cards and cards on incomplete orders are outside it, and never added in.
If it is still higher than you expect, the usual cause is cards sold years ago that never expired, because they were sold before you set a period. They are still owed.
The report is not in the Reports menu¶
OpenCart shows it only when two things are in place, and a store can easily have one without the other:
- The setting. In Extensions → Extensions → Reports, check Outstanding gift card liability is enabled.
- The permission. The user group needs
extension/gift_cards/report/gift_cardsunder Access Permission. Installing the module grants it to the installing group only, so a colleague's group will not have it.
With one but not the other, the report is installed and invisible rather than refused.
Gift Cards is offered in Design → Layouts¶
OpenCart offers every installed module in Design → Layouts, and Gift Cards is listed there with the rest. It has nothing to draw in a layout position: everything it shows on the storefront is placed by itself, on the pages described in the guides. Leave it out of your layouts, and if you have put it in one and that page shows an error where it sits, take it out again.
Nothing here matches¶
Gift Cards writes what it did to the store's shared log, and there is a Detailed logging switch on its settings screen that opens a two-day window of much more detail. Turn it on, reproduce the problem, and read the log (see logging). The window closes by itself.
Then get in touch.