How to delete orders in Prestashop

December 4th, 2009

Most of you have created few test transactions with your ecommerce website (Prestashop) when building it. By the time you decided to delete / clear all test orders in Back Office but wonder how as no “delete button” available.

The solutions is very simple

Option 1:

Click on one of the order and replace the parameters “vieworder” by “deleteorder” from the url

For example

http://yourdomain.com/admin/index.php?tab=AdminOrders&id_order=7&vieworder&token=798dfd720021761c80d828eb3f2a8621

Change it to:

http://yourdomain.com/admin/index.php?tab=AdminOrders&id_order=7&deleteorder&token=798dfd720021761c80d828eb3f2a8621

Option 2: For the sake of PHP

Go to AdminOrders.php class in webroot\admin\tabs\AdminOrders.php

At line 25 look for

global $cookie, $currentIndex;

And add this code below it…

$this->delete = true;

That’s it.. when you click on “Order” main tab you will see the delete button “X” next to each order (screenshot)

add-delete-button-prestashop-orders

Categories: PHP, Prestashop | Tags: , , | 1 Comment