PRESTASHOP
How to Delete Unfinished Orders in Prestashop
Learn how to delete unfinished, old, or test orders in Prestashop, either by editing the AdminOrders.php files or using a free module.
This tip can be useful for deleting orders that were not completed, old, and test orders.
Until version 1.4, access the file AdminOrders.php (In this path -> administration/tabs/AdminOrders.php )
Locate the string $this->colorOnBackground with Ctrl+F;
Insert the code $this->delete = true, as in the example below.
It should look like this:
$this->table = 'order';
$this->className = 'Order';
$this->view = true;
$this->colorOnBackground = true;
$this->delete = true;
For version 1.5 there is the possibility of free modules. Anyway, you can edit the same file mentioned above, but in a different path.
AdminOrdersController.php (File path -> /controllers/admin/AdminOrdersController.php )
Inside the construction function (construct) in the file insert the content below:
$this->addRowAction('delete');
It should look like this example:
public function __construct()
{
$this->table = 'order';
$this->className = 'Order';
$this->lang = false;
$this->addRowAction('view');
$this->addRowAction('delete');
$this->explicitSelect = true;
$this->deleted = false;
$this->context = Context::getContext();
There is another way for this deletion using the URL on the order view screen in your Prestashop administration. This way, you don’t need to change any code. When clicking to view the order in the administration, the URL should look like this (after the domain name):
/administration/index.php?controller=AdminOrders&id_order=3&vieworder&token=tokenofthepage
Change the bold text ( change vieworder to deleteorder in the URL) leaving it as in the example below:
/administration/index.php?controller=AdminOrders&id_order=3&deleteorder&token=tokenofthepage
Access the new URL and see that the order has been deleted. Remembering that the rest of the URL does not matter. This simple change should generate the desired result.
As I mentioned the free module, here is the download URL below. On the mypresta website you will also find other useful modules.
http://mypresta.eu/modules/administration-tools/delete-orders-free.html
Big hug and see you next time!
Revisited in November 2026
I fixed a detail in the example URLs: between AdminOrders and id_order there’s an &, not a slash.
And a warning that was missing in 2015. PrestaShop leaves out the delete-order button on purpose: an order touches stock, the customer’s history and sales reports, and deleting it straight from the database can leave those numbers inconsistent. For test orders before the store goes live, deleting is reasonable, with a backup made first. For real orders that weren’t completed, the safer route is changing the status to Canceled.
From version 1.7.7, from 2020, the orders screen was rebuilt and no longer uses AdminOrdersController.php, so
editing that file doesn’t apply to those versions.
Who writes this
Eduardo Lira
Software developer in Rio de Janeiro. I started this blog in 2012, in technical support at a hosting company, writing down the fixes for the problems that came up every day. Today I work at Sofis Tecnologia, on critical healthcare systems and SQL Server database migrations.