Delete Order on Prestashop

As a lead Prestashop development company, I have experience with Prestashop since 2011. I developed a first website by Prestashop version 1.3 and form the version till now 1.6, A lot of my Prestashop client asked to delete order. Example you want to delete test order. Or some canceled order. Today I will help you to know how to remove PS order.

There are only 3 simple steps:

1. Create a new file: /override/controllers/admin/AdminOrdersController.php
2. Add bellow code to your new file:

<?php
class AdminOrdersController extends AdminOrdersControllerCore{    
    public function __construct()    {        
        $this->addRowAction('delete');
        parent::__construct();
    }
}

3. Delete the file: /cache/class_index.php

Now go to order panel in Back Office. You will see:



Note: Before delete the order, we have to go through that order and change status to “Canceled” before delete it by the icon’s button that we activated it in the first part. Otherwise the item in stock will be gone with the deleted order as well.

If you have any question, don't hesitate to contact to prestashop expert here: http://www.globosoftware.net/contact-us/

Comments

Popular posts from this blog

Prestashop edit invoice template by Advanced invoice module

Presetashop 1.7.x How to edit PDF Invoices

Shop Instagram Gallery Prestashop Module