Edit a PrestaShop order with DataFirefly Order Editor
Install the module, choose the settings, then edit a validated order in the full-screen editor: products, customer, addresses, discounts, shipping, credit slip and new invoice, history and revert.
Overview
DataFirefly Order Editor lets you edit a validated order like a cart: add or remove products, swap a combination, correct a quantity or a price, change the address, the carrier or even the customer, remove or add a discount. Editing happens in a full-screen workspace, with a before / after summary on the right that updates while you work. Nothing is saved until you confirm.
Every edit is recalculated by the PrestaShop cart engine. An invoice already issued is cancelled by a credit slip and replaced by a new invoice, or updated if you prefer, and every edit is recorded in a history with a comparison and the option to revert it.
The module runs on PrestaShop 8.0 to 9.x with PHP 7.4 to 8.5. It is translated into English, French, Spanish, German, Italian, Dutch, Polish and Portuguese.

Installation
- In Modules > Module Manager, click Upload a module and drop the
dforderedit-2.0.0.zipfile. - On installation, the module grants its permissions to the profiles that can already edit orders (for example SuperAdmin, Salesman, Logistician).
- Open an order in Orders > Orders: the Order editor block appears under the product list, with the Edit this order button and the edit history.
A profile that can view orders but not edit them sees the block in read-only mode: the history and the archived PDFs, without the edit button. To open the editor to a new profile, give it the edit permission on orders, then tick the module permissions in Advanced Parameters > Team > Permissions.

Settings
The module page has three tabs: Dashboard, Edit journal and Settings. The settings are grouped in three blocks.
When can an order be edited?
- Order states where editing is allowed: the Cancelled, Refunded and Payment error states are excluded by default.
- Editing window: number of days after the order date during which it can be edited. 0 = no limit.
Invoices and stock
- Default invoice handling: credit slip and new invoice (recommended once the invoice has been sent, mandatory in France), or update of the existing invoice with the same number. You can change this choice on every edit.
- Restock removed quantities by default.
Team and traceability
- Notify the customer by email by default.
- Add a private note to the order after each edit.
- Require an internal note explaining each edit.
- Allow assigning the order to another customer.

Editing an order
Opening the editor
On the order page, click Edit this order. The editor opens full screen. On the left, the Products, Customer and addresses, Discounts and Shipping sections, then Invoice, stock and notification. On the right, the summary: number of pending changes, new totals, taxes, payments and alerts. The Esc key or the Close button leaves the editor; if changes have not been applied, you are asked to confirm.
Products
- Add a product: type a name, a reference, an EAN or an ID in the search. Arrow keys and Enter let you pick with the keyboard. The stock and the customer’s catalog price are shown. For a product with combinations, choose the combination.
- Swap the combination: the list shows the stock of each combination, and the previous combination is recalled under the line.
- Correct the quantity or the price: − / + buttons for the quantity. The price paid by the customer is kept and recalled under the price; the Apply catalog price link takes the current price for this customer (group, specific prices, quantity discounts).
- Prices entered tax excl. or tax incl.: the switch above the table follows the customer group’s price display by default. A price entered tax incl. is converted to tax excl., which remains the order’s reference.
- Remove a line: the line is struck through and can be restored until you confirm.
Each line carries a badge: Modified, Added, Combination changed or Removed. A line given free by a cart rule is flagged with the Gift of the cart rule badge.

Customer and addresses
Pick another address of the customer from the list, or click Edit the fields of this address to correct a street or a postcode. An edited address is saved as a new address linked to this order only: past orders and the customer’s address book do not change. If the country changes, the tax on products and shipping is recalculated.
If the setting is enabled, Assign to another customer lets you search for a customer by name, email or ID, then choose their delivery and invoice addresses. A new invoice is issued in their name. The change of customer is refused if the order already has refund credit slips.

Discounts and shipping
Untick a discount to remove it from the order. The search adds an existing cart rule by name or code. Add a free discount creates a discount as an amount tax incl. or a percentage, with the label of your choice. It is saved as a disabled cart rule, reserved for the customer and already used: it cannot be reused.
Carriers are shown as cards with their price and delivery time for the edited cart; those that cannot deliver this cart are flagged. Three modes apply to the shipping cost:
- Keep the shipping cost of the order: the amount tax excl. is kept, the tax follows the address if it changes country.
- Recalculate with the selected carrier: required when you change carrier.
- Set a shipping cost (tax incl.).

Invoice, stock and notification
- Invoice: cancel with a credit slip and issue a new invoice, or update the existing invoice (same number).
- Restock removed quantities.
- Send the updated order summary to the customer, in their language.
- Order state after the edit: the state changes through PrestaShop’s native order history, with its usual emails.
- Internal note, saved in the edit history (mandatory if the setting requires it).
Summary and confirmation
A moment after each change, the summary shows the total tax incl. before and after with the difference, the products, discounts, shipping and tax breakdown, then the payment balance: Remaining to be paid by the customer, Overpayment to refund to the customer or payments that exactly cover the new total. Alerts are grouped under Check before applying: insufficient stock, invoice already issued, order already shipped, gift product, cart rule whose minimum is no longer reached, carrier that no longer delivers.
Click Review and apply (or Ctrl + Enter): the confirmation lists everything that will be saved, the documents that will be created and the new state. Click Confirm and apply, and the page reloads on the updated order.

Invoice and credit slip
Credit slip and new invoice mode (default)
- The invoice PDF is archived as it was, before anything is written.
- A credit slip cancels the invoice for its full amount. Its PDF is archived too.
- A new invoice is issued with the next number. The lines, discounts, carrier and payments are attached to it.
The cancelled invoice always downloads with its original PDF, in the back office and in the customer account, and carries a cancellation notice. It also comes out as issued in the bulk export of Orders > Invoices (by date or by status), and never receives a fictitious payment when the order later moves to a paid state.
If the order has several invoices, they are all cancelled by credit slips and replaced by a single new invoice.
Update mode
The amounts of the existing invoice are updated and it keeps its number, as PrestaShop does natively. The PDF from before the edit is archived anyway.
If no invoice has been issued yet, there is nothing to regenerate: only the order is updated.
Payments and refunds
The payment already received stays on the order and is attached to the new invoice. After the edit, a banner shows the amount left to pay or overpaid, with the Record a payment and Partial refund buttons that open PrestaShop’s native tools. The module never collects or refunds money by itself: refunds are made with your payment provider.
Stock
Stock is adjusted by difference, with native stock movements. A quantity changed from 2 to 3 uses one unit, a removed line goes back to stock if the option is ticked, a swapped combination returns the old one and uses the new one. If the order has already shipped, an alert asks you to check that the goods have actually come back.
Locked lines
- Refunded or returned line: can be neither edited nor removed, so as not to distort existing credit slips.
- Customised line (text, file uploaded by the customer): can only be removed. The customer’s files are never touched.
- Product deleted from the catalog: the line can only be removed.
Customer email
If you tick the notification, the customer receives an email in their language with the list of changes, the new order content and the amount left to pay or to be refunded. PrestaShop’s generic “order edited” email is not sent on top. Without notification, the customer receives nothing.

History and revert
The history, in the order block, shows each edit on a timeline: date, employee, total before and after, document type, internal note. Show details opens the line-by-line comparison (quantities, prices, combinations), the discounts, the addresses, the carrier, and the links to the archived PDFs: cancelled invoice (original PDF), invoice before the edit and cancellation credit slip.

The last edit of an order can be reverted with Revert this edit, as long as the order has not changed since. The reverse changes are loaded into the editor: you check the preview, then apply as a normal edit, with its documents. The revert is recorded too.

If two employees work on the same order, the second one is stopped: when the order has changed since the editor was opened (another edit, a payment, a refund), the preview and the apply step are refused with a Reload button.
On uninstall, the history and the archived PDFs are kept so that cancelled invoices remain identified if the module is reinstalled.
Dashboard and journal
The Dashboard sums up the last 30 days: edits, orders edited, net change of totals (converted to the default currency), credit slips and new invoices issued, edits reverted, recent edits and edits by employee.

The Edit journal lists every edit in the shop with order, customer, employee, date, totals before / after, difference, invoice type and note. It can be filtered by order ID or reference, by employee and by period, and exported to CSV.

Upgrading from version 1.0.0
Upload dforderedit-2.0.0.zip over the previous version from the Module Manager. The upgrade adds its columns and new settings without touching the history or the archived PDFs. Invoices cancelled with 1.0.0 keep their original PDF in the history; edits made with 1.0.0 cannot be reverted automatically.
For developers
actionOrderEdited: PrestaShop’s native hook, called withorderafter each edit (the ps_emailalerts module is not called, to avoid the generic customer email).actionDfOrderEditAfter: called withorder,id_dforderedit_log,changes(lines, discounts, addresses, carrier, totals) andid_order_slips.
The recalculation goes through a temporary cart that is never attached to an order and is deleted at the end. The preview is calculated in a transaction that is always rolled back. The tax breakdown of the lines is recalculated with PrestaShop’s native method.
Troubleshooting
The Edit this order button does not appear
The block states the reason: order state outside the editable states, order older than the edit window, deleted customer, or read-only profile. Adjust the module settings or the profile permissions.
“This order has been modified since the editor was opened”
Another employee, a payment or a refund changed the order. Click Reload to start again from the latest version.
The carrier cannot deliver the new cart
The weight, amount or zone is outside the carrier’s ranges. Choose another carrier or set the shipping cost manually.
The price of a line could not be set exactly
A catalog rule (a group discount, for example) applies on top of the price entered. Check the price in the summary before confirming.
Order from a multi-carrier cart
When a cart was split into several orders, cart rules are recalculated on the edited order only. An alert reminds you of this in the summary.