Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
How to delete orders complete? 
 
Lol
Member
 
Avatar
Total Posts:  46
Joined:  2008-06-26
Plymouth, UK
 

I have to test things on the live site because my client insists on my doing so. I know that he will want/need to be able to easily remove test orders or any incomplete orders. I really hope that removing orders or resetting the sales related part of the db will become easier to do in future versions of Magento.

 
Magento Community Magento Community
Magento Community
Magento Community
 
caos989
Member
 
Total Posts:  39
Joined:  2008-07-25
Linz, Austria
 

please Magento Team make it easier for us....

I need this function too

 
Magento Community Magento Community
Magento Community
Magento Community
 
russell2pi
Jr. Member
 
Total Posts:  25
Joined:  2008-07-19
 

FWIW I tried the version posted by Sensi, under 1.1.2, and it appears to have worked. I have not yet processed any orders since then though—will have to wait until I get a real live customer!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lol
Member
 
Avatar
Total Posts:  46
Joined:  2008-06-26
Plymouth, UK
 
Sensi - 18 August 2008 06:30 AM

gamelodge - 05 August 2008 04:28 PM
@R.Verheij & Sensi - v1.1.2
SQL query:

TRUNCATE `sales_flat_quote` ;

MySQL said: Documentation
#1217 - Cannot delete or update a parent row: a foreign key constraint fails

Yeah, like mentioned it was meant for 1.1.1, will have to check which changes were introduced by 1.1.2.

Anyone know which changes were introduced by 1.1.2 yet and if there is an easy fix for the MySQL error thrown up by the 1.1.1 compatible script?

 
Magento Community Magento Community
Magento Community
Magento Community
 
russell2pi
Jr. Member
 
Total Posts:  25
Joined:  2008-07-19
 
Lol - 21 August 2008 01:56 AM

Sensi - 18 August 2008 06:30 AM
gamelodge - 05 August 2008 04:28 PM
@R.Verheij & Sensi - v1.1.2
SQL query:

TRUNCATE `sales_flat_quote` ;

MySQL said: Documentation
#1217 - Cannot delete or update a parent row: a foreign key constraint fails

Yeah, like mentioned it was meant for 1.1.1, will have to check which changes were introduced by 1.1.2.

Anyone know which changes were introduced by 1.1.2 yet and if there is an easy fix for the MySQL error thrown up by the 1.1.1 compatible script?

See my post above—I didn’t get any SQL errors.

However, it seems that Best Sellers, Most Viewed Products etc aren’t working ?? Not sure as I hadn’t actually used those features before either.

 
Magento Community Magento Community
Magento Community
Magento Community
 
scree
Sr. Member
 
Avatar
Total Posts:  92
Joined:  2008-07-14
Linz
 

could it be a problem to keep those “old orders” and having the same order-id later? isn’t this just an alias for the order id? when i click on an order in the backend, my order id says 4546377 and the url is /admin/sales_order/view/order_id/21/ --> so I could reset the start increment_id to 4546370 and another 4546377 will be no problem. correct?

 
Magento Community Magento Community
Magento Community
Magento Community
 
medlington
Member
 
Total Posts:  69
Joined:  2008-04-30
 

anyone know if there is plans to fix this in V1.1.4?

Im just about to upgrade a couple of sites but Il hold of till the next release if you will be able to delete orders.

I know virtually nothing about my-sql but is there anyway someone could adapt the scripts on this thread to selectively delete certain orders and not just all of them?

 Signature 

the worlds most portable football goals - 3d animation sheffield - Product design and prototype development - Kenya tourist information - Fable Films - Video Production Sheffield

 
Magento Community Magento Community
Magento Community
Magento Community
 
scree
Sr. Member
 
Avatar
Total Posts:  92
Joined:  2008-07-14
Linz
 

maybe this could help:

SET FOREIGN_KEY_CHECKS=0;

TRUNCATE `sales_order`;
TRUNCATE `sales_order_datetime`;
TRUNCATE `sales_order_decimal`;
TRUNCATE `sales_order_entity`;
TRUNCATE `sales_order_entity_datetime`;
TRUNCATE `sales_order_entity_decimal`;
TRUNCATE `sales_order_entity_int`;
TRUNCATE `sales_order_entity_text`;
TRUNCATE `sales_order_entity_varchar`;
TRUNCATE `sales_order_int`;
TRUNCATE `sales_order_text`;
TRUNCATE `sales_order_varchar`;
TRUNCATE `sales_flat_quote`;
TRUNCATE `sales_flat_quote_address`;
TRUNCATE `sales_flat_quote_address_item`;
TRUNCATE `sales_flat_quote_item`;
TRUNCATE `sales_flat_quote_item_option`;
TRUNCATE `sales_flat_order_item`;
TRUNCATE `sendfriend_log`;
TRUNCATE `tag`;
TRUNCATE `tag_relation`;
TRUNCATE `tag_summary`;
TRUNCATE `wishlist`;
TRUNCATE `log_quote`;
TRUNCATE `report_event`;



ALTER TABLE `sales_orderAUTO_INCREMENT=1;
ALTER TABLE `sales_order_datetimeAUTO_INCREMENT=1;
ALTER TABLE `sales_order_decimalAUTO_INCREMENT=1;
ALTER TABLE `sales_order_entityAUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_datetimeAUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_decimalAUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_intAUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_textAUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_varcharAUTO_INCREMENT=1;
ALTER TABLE `sales_order_intAUTO_INCREMENT=1;
ALTER TABLE `sales_order_textAUTO_INCREMENT=1;
ALTER TABLE `sales_order_varcharAUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quoteAUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_addressAUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_address_itemAUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_itemAUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_item_optionAUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_itemAUTO_INCREMENT=1;
ALTER TABLE `sendfriend_logAUTO_INCREMENT=1;
ALTER TABLE `tagAUTO_INCREMENT=1;
ALTER TABLE `tag_relationAUTO_INCREMENT=1;
ALTER TABLE `tag_summaryAUTO_INCREMENT=1;
ALTER TABLE `wishlistAUTO_INCREMENT=1;
ALTER TABLE `log_quoteAUTO_INCREMENT=1;
ALTER TABLE `report_eventAUTO_INCREMENT=1;


-- 
reset customers
TRUNCATE 
`customer_address_entity`;
TRUNCATE `customer_address_entity_datetime`;
TRUNCATE `customer_address_entity_decimal`;
TRUNCATE `customer_address_entity_int`;
TRUNCATE `customer_address_entity_text`;
TRUNCATE `customer_address_entity_varchar`;
TRUNCATE `customer_entity`;
TRUNCATE `customer_entity_datetime`;
TRUNCATE `customer_entity_decimal`;
TRUNCATE `customer_entity_int`;
TRUNCATE `customer_entity_text`;
TRUNCATE `customer_entity_varchar`;
TRUNCATE `log_customer`;
TRUNCATE `log_visitor`;
TRUNCATE `log_visitor_info`;


ALTER TABLE `customer_address_entityAUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_datetimeAUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_decimalAUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_intAUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_textAUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_varcharAUTO_INCREMENT=1;
ALTER TABLE `customer_entityAUTO_INCREMENT=1;
ALTER TABLE `customer_entity_datetimeAUTO_INCREMENT=1;
ALTER TABLE `customer_entity_decimalAUTO_INCREMENT=1;
ALTER TABLE `customer_entity_intAUTO_INCREMENT=1;
ALTER TABLE `customer_entity_textAUTO_INCREMENT=1;
ALTER TABLE `customer_entity_varcharAUTO_INCREMENT=1;
ALTER TABLE `log_customerAUTO_INCREMENT=1;
ALTER TABLE `log_visitorAUTO_INCREMENT=1;
ALTER TABLE `log_visitor_infoAUTO_INCREMENT=1;


-- 
Reset all ID counters
TRUNCATE 
`eav_entity_store`;
ALTER TABLE  `eav_entity_storeAUTO_INCREMENT=1;

SET FOREIGN_KEY_CHECKS=1;

for setting start values, click here

 
Magento Community Magento Community
Magento Community
Magento Community
 
ndosalak
Jr. Member
 
Total Posts:  1
Joined:  2008-08-20
 

Banyaknya order yang tidak di proses malah bikin bingung.
Kalau bisa dihapus saja, tapi bagaimana caranya ????
Delete Order button nya kok belum dibikin.

zipper

 
Magento Community Magento Community
Magento Community
Magento Community
 
gamelodge
Sr. Member
 
Avatar
Total Posts:  89
Joined:  2007-08-31
Brisbane, Qld, Australia
 

@Magento Team

Please could you let us know what info/data needs to be deleted & in what tables if we want to delete an order.

If I know this ‘officially’ then I can write a module to add a delete button to the orders and the huge over-site of not having a delete order button problem can be solved, I just don’t want to go around deleting things that will break ‘other’ things.

Please help with some input

 
Magento Community Magento Community
Magento Community
Magento Community
 
bntabor
Jr. Member
 
Total Posts:  5
Joined:  2008-05-27
 

Option to delete entire order, ie. test orders,
Need to be able to delete credit card data for those processing offline, card number & exp date.
ability to set starting order number ie.  0004567 instead of 0000001

 
Magento Community Magento Community
Magento Community
Magento Community
 
gamelodge
Sr. Member
 
Avatar
Total Posts:  89
Joined:  2007-08-31
Brisbane, Qld, Australia
 

Bump..... Because I am in Australia so So I don’t think Magneto team see my posts due to time difference....  smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
topspotweb
Jr. Member
 
Total Posts:  16
Joined:  2008-06-12
 

This is really needed - reinstall, product backup, re-configure, and CMS ... just to clean out all customers and orders.

-CK

 
Magento Community Magento Community
Magento Community
Magento Community
 
syle
Jr. Member
 
Total Posts:  16
Joined:  2008-07-01
Cluj
 

I need this function too

 Signature 

It’s More Important to be Nice.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crazy Serb
Jr. Member
 
Total Posts:  10
Joined:  2008-07-23
 

function to delete certain orders is still not available?

geez…

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
52306 users|439 users currently online|105629 forum posts