PrestaShop Theme does not provide any functionality to delete the order. It does not allow you to remove the Test order or Old order.
Here, There are 2 ways to delete orders without any external module. When you try these 2 methods, Please be careful. Otherwise, take a backup of Your Database.
Here we go with these methods!
You can delete the order by changing the URL. Follow the below step to delete the order.
Go to Prestashop Admin panel >> Orders.
Click on the View button, which you want to delete it.
After clicking on View button, You can see URL in a browser like this:
You need to simply replace the “vieworder” with “deleteorder”. For example bottom URL:
Press enter, The order will delete.
Another way to delete the order is to add the “delete button” in the order section. Follow the below step to add the delete button.
- 1. Go to controllers/admin/AdminOrdersController.php
- 2. Add $this->addRowAction(‘delete’); line. You can see in the below image where to put this line.
3. Save this page and refresh the order page in the admin side. You can see the “delete” button display on the order page.
But, If you don’t need “delete” button, Then please remove this $this->addRowAction(‘delete’); line.
Hope you will understand all these steps to Delete order in PrestaShop.