Page 1 of 1

Delete multiple orders

Posted: Wed Aug 12, 2015 1:11 pm
by ultraspoon
Hey all,

Im not sure if this is a bug or not but im trying to delete multiple orders at once, specifically missing orders as I have alot of them!

There is no 'multiple' delete button in the orders page, there is a delete button next to each order but not one at the top right like on products.

Is it supposed to be like this?

Cheers

Re: Delete multiple orders

Posted: Sat Aug 15, 2015 1:14 am
by straightlight
If you don't see any checkmarks on the left side of each rows as the first entry, normally, then it is not a bug. It may be a different feature presented compared to the products but not a bug.

Re: Delete multiple orders

Posted: Mon Aug 17, 2015 10:32 pm
by ultraspoon
Hi straightlight,

Thanks for your reply,

Thats the issue though, there is a checkbox next to the orders, it is possible to select them all, there is just no delete all button on that page.

Thats why I think its a bug, why is there the ability to select all the orders but then no way to interact with them all? Its like the button was just forgotten about.

This has been posted a couple of times also on the forum but those posts just got ignored.

Thanks

Re: Delete multiple orders

Posted: Tue Aug 18, 2015 2:11 am
by straightlight
In admin/controller/sale/order.php file,

find:

Code: Select all

$data['add'] = $this->url->link('sale/order/add', 'token=' . $this->session->data['token'], 'SSL');
add after:

Code: Select all

$data['delete'] = $this->url->link('sale/order/delete', 'token=' . $this->session->data['token'], 'SSL');
In admin/view/template/sale/order_list.tpl file,

find:

Code: Select all

<button type="submit" id="button-shipping" form="form-order" formaction="<?php echo $shipping; ?>" data-toggle="tooltip" title="<?php echo $button_shipping_print; ?>" class="btn btn-info"><i class="fa fa-truck"></i></button>
add before:

Code: Select all

<button type="submit" id="button-delete" form="form-order" formaction="<?php echo $delete; ?>" data-toggle="tooltip" title="<?php echo $button_delete; ?>" class="btn btn-info"><i class="fa fa-trash-o"></i></button>
This should correct the problem.

Re: Delete multiple orders

Posted: Mon Sep 28, 2015 8:10 pm
by lordslave
Didn't work for me. The delete button appeared at the top, but when I click on it the admin is opened again in another tab without deleting any requests.

My Opencart 2.0.2.0

Re: Delete multiple orders

Posted: Mon Sep 28, 2015 11:45 pm
by straightlight
lordslave wrote:Didn't work for me. The delete button appeared at the top, but when I click on it the admin is opened again in another tab without deleting any requests.

My Opencart 2.0.2.0
I just modified the step above. It should work accordingly now.

Re: Delete multiple orders

Posted: Sat Nov 07, 2015 1:47 am
by exit15
Can this be made into a mod? so that we don't have to remember to change with every upgrade. I was testing V 2.1 and this is still an issue there. Frankly an oversight by the developers since we all know too well that the "missing orders" quickly fills up by schmucks testing stolen credit cards.

Re: Delete multiple orders

Posted: Sun Dec 06, 2015 8:33 pm
by straightlight
exit15 wrote:Can this be made into a mod? so that we don't have to remember to change with every upgrade. I was testing V 2.1 and this is still an issue there. Frankly an oversight by the developers since we all know too well that the "missing orders" quickly fills up by schmucks testing stolen credit cards.
The point of posting code fixes on the forum is to avoid on remembering the change for next releases as it is already up to the Opencart team to add those corrections upon each releases since day one. Delays based on each releases that involves bug fixes is are not simply based on software error.

Re: Delete multiple orders

Posted: Sat Dec 03, 2016 9:03 pm
by sully210
I am using version 2.0.3.1 and I tried the steps above with the .tpl files and it didn't work for me. Any other suggestions? I know I can export my database, delete them there, and then import my databasse again but that is a pain.

Re: Delete multiple orders

Posted: Thu Mar 08, 2018 12:03 pm
by supak111
Can someone please look at this FIX code because it does not work. When you add the code and you check off which orders you need deleted and CLICK DELEET button it just opens a new tab without still all orders checked but nothing deleted.

PLEASE PLEASE someone help. I'm on 2.0.1.1

Re: Delete multiple orders

Posted: Wed Mar 14, 2018 1:53 am
by straightlight
By re-reading this topic, there would be no point on setting a batch deleted orders list to select since the payment provider would still have a copy of those orders when customers purchases the goods. Which is why, it is rather best to keep the orders on the list. Otherwise, you can also remove them from PHPMyAdmin since a merchant still has control over its domain but still not suggested if the order status did changed on the payment provider's end.