Page 1 of 1

clear orders

Posted: Fri May 21, 2010 7:46 pm
by dazdonone
Hello,

please i have just finish installation and integration of the cart with our local payment platform. I had to carry out a lot of test transactions, and now i would like to clear all transactions.

please does anyone know how to do this without having to individually delete each one one at a time.

thank you in advance.

Re: clear orders

Posted: Fri May 21, 2010 8:12 pm
by JNeuhoff
I don't quite understand your question.

Normally, after you have submitted a shopping cart to your payment gateway and done the payment, the user ends up on the checkout/success page whose underlying controller clears the session's shopping cart.

Re: clear orders

Posted: Fri May 21, 2010 8:57 pm
by SteveSherry
you need to truncate the mysql tables, this will remove the current orders.

Re: clear orders

Posted: Fri May 21, 2010 9:29 pm
by Qphoria
he just wants to delete all orders from the database.

Best bet is to set the Admin Item list count to 100 and then load the orders page and check each checkbox and click delete

Re: clear orders

Posted: Thu Sep 15, 2011 10:19 pm
by hotwebideas
Although a year later from the last post, I had this same question and Qphoria answer is the best one. Thanks Q.

I have close to 200 test orders, so I display 200 orders and click them all.

Q said to click each one, but with 1.5.x, there is a check all checkbox! Thanks for that.

Bruce

Re: clear orders

Posted: Thu Sep 15, 2011 11:11 pm
by Qphoria
hotwebideas wrote: Q said to click each one, but with 1.5.x, there is a check all checkbox! Thanks for that.
That was the number 1 change in 1.5.x :joker: :laugh:

Re: clear orders

Posted: Mon Sep 19, 2011 11:50 pm
by hotwebideas
Qphoria wrote:
hotwebideas wrote: Q said to click each one, but with 1.5.x, there is a check all checkbox! Thanks for that.
That was the number 1 change in 1.5.x :joker: :laugh:
Cool! Good number 1 change!

Re: clear orders

Posted: Wed Jan 18, 2012 1:25 pm
by pagetopixel
Hi Q,

In 1.5.x i am looking at Reports-sales-orders and I dont see the checkbox. Am I not looking in the right place?

thanks,

Re: clear orders

Posted: Wed Jan 18, 2012 2:49 pm
by jty
To delete orders, look in Sales > Orders (not reports)

Re: clear orders

Posted: Sun Feb 05, 2012 3:24 pm
by tooheys
Yes you can delete the orders, but not out of the reports.

how can you remove test data etc???

Re: clear orders

Posted: Sun Feb 19, 2012 6:59 pm
by rfe
I am having the same problem here, how can I delete all test orders from sales report?

I deleted all from sales > orders

But I still have information on Reports > Sales > Orders/Tax/Shipping

I want to delete all this information as was generated for test propose.

Thank you.

Re: clear orders

Posted: Thu Mar 15, 2012 10:55 pm
by narkedesign
Did anyone have an aswer to remove all test orders from the reports, customers dont want to see these figures!

Cheers M

Re: clear orders

Posted: Mon Mar 19, 2012 5:01 am
by OO7
I was wondering if anyone has found a solution on how to clear (reset) or delete sales report data? The scenario below describe the issue:

Scenario:
When you fresh-install opencart, you will need to test it to make sure everything is working well. One aspect of the testing involves placing a "demo" or "test" order. After placing a "test" order (demo order), a sales REPORT is automatically generated in the Admin section. However, you will NEED to delete/clear (reset) this "test" sales report before launching your live store.

The Problem
There doesn't seem to be a way (for dummies like me) to delete or clear the data generated during the testing process. For example, if you placed a test order worth $500, the sales report automatically records $500. And because you can't delete or clear out the $500 test (demo) order from sales report, your sales report will not give an ACCURATE report by the time you finally launch your live store.

*******Please note that "Order" data can be easily deleted from Admin BUT the issue I (and others) are talking about is with the "REPORT" sections of OpenCart. It would be great if the "REPORT" sections have "Reset" button *******

This issue has already been clearly highlighted in simple terms by others in this community, but so far there seem to be no solution. The solution mentioned by Qphoria (respect and gratitude to the GURU) does not seem to clear "test" data from "Reports". Any help out there???

Thanks

Re: clear orders

Posted: Thu Mar 22, 2012 5:06 am
by Spiffalizer
I opened the database in phpMyAdmin and removed the data in the _order section. I took a backup first but it seems to work so far.

Re: clear orders

Posted: Mon Sep 10, 2012 9:44 pm
by devplus
Open the database in phpmyadmin, move to SQL tab and execute the following query:

TRUNCATE `order`;
TRUNCATE `order_download`;
TRUNCATE `order_fraud`;
TRUNCATE `order_history`;
TRUNCATE `order_misc`;
TRUNCATE `order_option`;
TRUNCATE `order_product`;
TRUNCATE `order_total`;

Don't forget to take a BACKUP first!

Re: clear orders

Posted: Fri Feb 07, 2014 3:59 am
by alibear57
[quote="devplus"]Open the database in phpmyadmin, move to SQL tab and execute the following query:

Thank you for your solution to the problem that everybody (including myself) has had. In my case I had to delete the [fraud] and [history] ones because I don't seem to have them - maybe I've got an older version, but the rest worked a treat.

Hope it also helped 007 who posted an excellently worded request on behalf of the rest of us who don't seem to be able to ask the right questions to get proper answers - thanks 007.

Re: clear orders

Posted: Tue May 26, 2015 1:08 am
by allexdaemon
devplus wrote:Open the database in phpmyadmin, move to SQL tab and execute the following query:

TRUNCATE `order`;
TRUNCATE `order_download`;
TRUNCATE `order_fraud`;
TRUNCATE `order_history`;
TRUNCATE `order_misc`;
TRUNCATE `order_option`;
TRUNCATE `order_product`;
TRUNCATE `order_total`;

Don't forget to take a BACKUP first!
and wich tables i have to truncate having the same problem on OC 2.0.1.1?
thank you

Re: clear orders

Posted: Thu Jun 04, 2015 8:01 pm
by allexdaemon
I have found.
So ... in order to reset de order id in opencart 2.0.1.1 u have to manualy truncate the order tables tables.
In phpMyadmin u just put this command and mysql will delete all data that are in this tables.
i hope it will be useful for someone.

TRUNCATE `oc_order`;
TRUNCATE `oc_order_custom_field`;
TRUNCATE `oc_order_fraud`;
TRUNCATE `oc_order_history`;
TRUNCATE `oc_order_option`;
TRUNCATE `oc_order_product`;
TRUNCATE `oc_order_recurring`;
TRUNCATE `oc_order_recurring_transaction`;
TRUNCATE `oc_order_status`;
TRUNCATE `oc_order_total`;
TRUNCATE `oc_order_voucher`;

Re: clear orders

Posted: Sat Jun 13, 2015 4:23 am
by kuuser
Warning -- I don't think you want to truncate order_status -- that is where the statuses of your orders is defined!!!

Re: clear orders

Posted: Wed Jul 15, 2015 8:23 pm
by allexdaemon
right. my bad. don\t truncate the order status :)