1. What this module does
Let customers cancel unpaid orders themselves and request the cancellation of paid ones. The module adds an Order cancellation block to the order details in the customer account. While the order has one of the statuses you allow and the time to cancel is not over, the customer chooses a reason, may add a comment and sends the form:
- an unpaid order is cancelled at once: it gets the cancellation status, PrestaShop sends its status e-mail and you get an e-mail;
- a paid order becomes a cancellation request: you approve or reject it in the order page of your Back Office, and the customer sees your decision in their account.
The module does not refund payments: you refund a paid order through your payment provider or your bank, as you do today. It does not cancel single products, it does not serve orders placed as a guest, and it has no separate list of requests: each request is shown in the page of its order.
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
- Download the module from My account → Order history at addonspresta.com.
- In your Back Office, open Modules → Module Manager and click Upload a module.
- Drop the
ap_ordercancel_v1.0.0.zipfile and wait for the confirmation. - Click Configure on the module card.
If you have shell access, you can also unpack the zip into modules/ and run
php bin/console prestashop:module install ap_ordercancel from the shop folder.
Right after the installation the module is on. Customers can cancel orders during 24 hours after ordering, while the order is awaiting payment, paid, being processed or on backorder; paid orders become requests; the e-mails for your staff go to the shop e-mail address. Check the settings (section 4) before you tell your customers about it, in particular the list of reasons and E-mail addresses of the shop staff.
3. How it works
The block in the customer account
The block appears in the order details page of the customer account (Order history → Details), only when:
- the customer is logged in with a real account (orders placed as a guest are not served, and the order tracking page for guests shows nothing), and the order is theirs and belongs to the current shop;
- Enabled is on for the shop of the order;
- the current status of the order is one of the Order statuses that allow a cancellation and is not the cancellation status itself;
- the Time to cancel is not over (counted from the moment the order was placed; 0 = no time limit);
- for a paid order, Paid orders: accept cancellation requests is on;
- at least one reason is set for the customer's language or the default language.
Otherwise the block is not shown at all. Once the customer has cancelled the order or sent a request, the block always shows its state, even when the order later changes status.
The form. The block says "You can cancel this order until
- Reason — a list with your reasons; "Choose a reason" must be replaced by one of them;
- Comment (optional) — free text of up to 500 characters;
- the button Cancel the order (unpaid) or Send the request (paid).
The form works without JavaScript. The button asks for no extra confirmation: the customer has already opened the form and chosen a reason.
Unpaid order: cancelled at once
An order is unpaid when no status in its history marks it as paid (for example "Awaiting bank wire payment", "Awaiting check payment", "Awaiting Cash On Delivery validation" or "On backorder (not paid)"). When the customer sends the form:
- The order gets the Status of a cancelled order ("Canceled" by default), exactly as if an employee had changed the status in the order page. The order history shows the change without an employee.
- PrestaShop does what that status says: with "Canceled" it puts the products back in stock and sends the customer its "order canceled" e-mail.
- Your staff gets the e-mail "Order … was cancelled by the customer" with the order, the customer, the total, the payment method, the reason and the comment.
- The customer sees "Your order has been cancelled." and, in the block, "You cancelled this order on
."
Paid order: a request for your decision
An order is paid when a status with the paid flag appears in its history ("Payment accepted", "Remote payment accepted", "Processing in progress", "On backorder (paid)"…). An order that was paid and then moved to another status stays paid. When the customer sends the form:
- The order does not change. The request is saved with the reason and the comment.
- The customer gets the e-mail "Your cancellation request for order …" and sees "Your cancellation request has been
sent. We will let you know our decision by e-mail."; the block then says "You asked us to cancel this order on
. We will review your request and let you know by e-mail." - Your staff gets the e-mail "Cancellation request for order …" with the order, the customer, the total, the payment method, the reason and the comment.
Deciding a request. Open the order in Orders → Orders. The card Cancellation by the customer shows the state ("Waiting for your decision"), "Paid order", the date (Submitted on), the reason and the comment. Below them:
- Message to the customer (optional) — up to 1000 characters;
- Approve and cancel the order — the order gets the cancellation status, with your name in the order history.
PrestaShop sends its status e-mail ("order canceled" for "Canceled") and, for "Canceled", puts the products back in
stock. Refund the payment yourself in your payment provider's dashboard or by bank transfer: the module does not
move money. The block in the customer account says "Your cancellation request was accepted on
." with your message below it; the message is not part of PrestaShop's status e-mail. - Reject — the order does not change. The customer gets the e-mail "Your cancellation request for order … was
declined" with your message, and the block says "Your cancellation request was declined on
." with your message.
After the decision the card shows "Approved" or "Rejected", the date (Decided on), the employee who decided and the message. Only employees who may edit orders (Orders → Orders, edit right) and who have access to the order's shop see the buttons; other employees see the card without them. If the order was shipped in the meantime, the card warns: "This order has already been shipped. Approving the request cancels it anyway: check the stock and the return of the goods yourself." You may still approve: you decide.
The card appears only for orders with a cancellation or a request; an order cancelled at once shows "Cancelled by the customer" and "Unpaid order" with the reason and the comment, without buttons.
One request per order. A customer can cancel or ask once per order. After a rejection they cannot send another request; they can write to you through your usual contact channels.
Order statuses, stock and the status e-mail
The module changes the status through PrestaShop, like an employee in the order page, so everything that depends on the status follows PrestaShop's rules:
- Stock. PrestaShop puts the products back in stock when the new status is "Canceled" or "Payment error". With a status of your own as Status of a cancelled order, the stock is not changed.
- Customer e-mail. PrestaShop sends the e-mail of the status when "Send an email to the customer" is on in Shop Parameters → Order Settings → Statuses ("Canceled" sends "order_canceled" by default).
- Other modules that react to status changes (accounting, ERP, marketplace connectors) see an ordinary status change.
E-mails
- To your staff: "Order … was cancelled by the customer" and "Cancellation request for order …", in the default language of the shop, to the addresses of E-mail addresses of the shop staff or, when the field is empty, to the shop e-mail address (Shop Parameters → Contact → Stores, "Contact details").
- To the customer: "Your cancellation request for order …" (request received) and "Your cancellation request for order … was declined" (rejection), in the language of the order.
The module's e-mails exist in English, Polish, French, German, Spanish and Italian. For another language the English
version is sent; your theme can add a template in that language or change the wording (see the README.md file in
the module zip, section "Customising").
The e-mails go out through your shop's mail settings (Advanced Parameters → E-mail).
Personal data, connections
The module keeps one line per cancelled order or request: the order, the customer, the reason, the comment, your message, the employee who decided and the dates. It sets no cookie, uses no browser storage and makes no outgoing connection — no licence check, no statistics, nothing to addonspresta.com or any other server.
If something fails while the block, the card, a cancellation or a decision is handled, a line starting with "Order Cancellation by Customer:" is written to Advanced Parameters → Logs.
4. Features and settings
Open Modules → Module Manager → Order Cancellation by Customer → Configure. The Help box at the top links this manual and the module page at addonspresta.com in the language of your Back Office, gives our support address and shows the installed version. Then come two panels, Cancellation rules and Reasons and e-mails, each with its own Save button that saves both; "Settings saved." confirms it. When a value is wrong, nothing is saved and the message is shown above your values.
Cancellation rules
Enabled
On after the installation. "Shows the cancellation block in the order details of the customer account." Off: the form is no longer offered in this shop. Cancellations and requests already sent stay visible to the customer, and the card stays in the order page, so you can still decide pending requests.
Order statuses that allow a cancellation
"The customer can cancel only while the order has one of these statuses. Statuses of shipped orders are not listed." At least one status must be ticked while the module is enabled. After the installation these are ticked, when they exist in your shop: "Awaiting check payment", "Awaiting bank wire payment", "Awaiting Cash On Delivery validation", "Payment accepted", "Remote payment accepted", "Processing in progress", "On backorder (paid)" and "On backorder (not paid)". Statuses of payment modules (for example "Waiting for payment") can be ticked too.
"Processing in progress" allows a cancellation even though the order is being prepared: untick it if your team must not be surprised by a cancellation during packing. Only statuses marked as shipped are excluded, and they are not listed.
The status of a cancelled order cannot be ticked here ("The status of a cancelled order cannot be one of the statuses that allow a cancellation."). A status that you later mark as shipped in Shop Parameters → Order Settings → Statuses stops allowing cancellations at once, even if it is still ticked.
Time to cancel
A whole number of hours, from 0 to 8760, 24 after the installation. "Counted from the moment the order was placed. 0 = no time limit." With 24, an order placed on Monday at 10:00 can be cancelled until Tuesday at 10:00; the block shows that date to the customer. Any other value is refused with "Enter the time to cancel as a whole number of hours from 0 to 8760."
Paid orders: accept cancellation requests
On after the installation. "Unpaid orders are cancelled at once. A paid order becomes a request that you approve or reject in the order page; you refund the payment yourself." Off: the block is shown only for unpaid orders, and paid orders cannot be cancelled from the customer account.
Status of a cancelled order
The status given to an order cancelled by the customer or approved by you; "Canceled" after the installation. The help line under the list reminds you that PrestaShop puts the products back in stock only with "Canceled" or "Payment error", and that the customer gets the e-mail of the status if the status sends one. Only statuses that do not mark an order as paid, shipped, delivered, invoiced or validated are listed: "Canceled", "Payment error", awaiting payment statuses and statuses of your own without these options. The module checks it again before every change and never gives an order a status that would mark it as paid, shipped or invoiced.
Keep "Canceled" unless you have a reason to change it: it is the status for which PrestaShop puts the products back in stock (see "Order statuses, stock and the status e-mail" in section 3). A status of your own, for example "Cancelled by customer", changes no stock, and sends an e-mail only if you set one for it.
Reasons and e-mails
Cancellation reasons
One field per language. "One reason per line, up to 10 reasons of up to 100 characters. A language left empty uses the reasons of the default language." After the installation every language of the shop gets five reasons, translated into English, Polish, French, German, Spanish and Italian (English for other languages):
I ordered by mistake
I want to change my order
I found a better price elsewhere
The delivery time is too long
Other reason
Empty lines and repeated lines are ignored. At least one reason is required in the default language while the module is enabled. The reason the customer chose is saved as text in their language, so changing the list later does not change past requests.
E-mail addresses of the shop staff
"Who is told about cancellations and requests, separated by commas (up to 5). Empty = the shop e-mail address." Each address gets the staff e-mails of the shop of the order.
These e-mails contain the customer's name, e-mail address and order: only an employee who may edit orders (or a super administrator) can change the field. For other employees it is read-only, with the note "Only an employee who may edit orders can change these addresses: the e-mails contain customer and order data."
5. Multistore
Settings are saved for the shop or shop group selected in the Back Office header. Values saved with All shops apply to every shop that has no value of its own; a shop whose settings were saved in its own context keeps them: select that shop to change them. In the All shops or a group context only an employee who manages every shop of that context can save.
Each order follows the settings of its own shop: allowed statuses, time to cancel, paid orders, cancellation status, reasons and staff addresses. The customer sees the block only for orders of the shop they are visiting, and the card in the order page is shown only to employees who have access to the shop of the order. One licence covers every shop of the installation.
6. Uninstall
Module Manager → Order Cancellation by Customer → Uninstall deletes the module's settings in every shop and its table with the cancellations and requests (reasons, comments, messages). The orders keep their status history: a cancelled order stays cancelled. A request still waiting for your decision is lost, so decide pending requests first.
Disable keeps the settings and the requests: while the module is disabled, neither the block nor the card is shown. Switching off Enabled only stops new cancellations in one shop.
7. FAQ and troubleshooting
The customer does not see the block in the order details. Check, for that order: the customer is logged in with an account (not a guest order); Enabled is on for the shop of the order; the current status is ticked in Order statuses that allow a cancellation; the Time to cancel is not over; for a paid order, Paid orders: accept cancellation requests is on; and the order has no cancellation yet. The theme must show the order details hook: Classic and Hummingbird do.
The message "This order can no longer be cancelled online. Please contact us." appears. The order changed between opening the page and sending the form: its status was changed, the time to cancel ran out, or the settings were changed. Nothing was done.
The message "A cancellation has already been submitted for this order." appears. The form was sent twice, for example from two tabs. Only the first one counts.
The products did not go back in stock. PrestaShop restocks only for the statuses "Canceled" and "Payment error". Check Status of a cancelled order.
The customer did not get an e-mail when I approved the request. On approval PrestaShop sends the e-mail of the cancellation status. Check that "Send an email to the customer" is on for that status in Shop Parameters → Order Settings → Statuses and that your shop sends e-mails (Advanced Parameters → E-mail, where you can send a test e-mail).
My staff does not get the e-mails. Check E-mail addresses of the shop staff (or the shop e-mail address when it is empty) and the mail settings of the shop. Look in the spam folder too.
Is the payment refunded automatically? No. The module never moves money. After approving a request, refund the payment in your payment provider's dashboard or by bank transfer.
I do not see Approve and Reject in the card. The request has already been decided, or your employee profile cannot edit orders (Orders → Orders, edit right) or has no access to the shop of the order.
The message "The page has expired. Reload it and try again." appears. The page was open for a long time, or you logged in again in another tab. Reload the page and click again.
Can the customer send a new request after a rejection? No, one request per order. The customer can contact you, and you can still cancel the order yourself in the order page.
Can customers cancel only some products of the order? No, the module cancels the whole order. Partial cancellations and returns stay in PrestaShop's order page and its merchandise returns.
A text of the module is still in English in my shop or my Back Office. Open International → Translations → Installed module translations, select the module and your language, and check the translation. The reasons are a setting per language in Cancellation reasons.
Can I change how the block looks?
Yes, from your theme, so your changes survive updates: the README.md file in the module zip, section "Customising",
lists the template blocks, the CSS classes, the e-mail templates and the hooks for developers.
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 and requests 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; we usually answer within 2 business days). Please include your PrestaShop version, the module version and the steps that lead to the problem.