Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to delete orders complete? 
 
createonline
Jr. Member
 
Total Posts:  10
Joined:  2008-04-20
New Zealand
 

Well, this is absolutely ludicrous!

Is this a running joke with you guys at Magento? Why not listen to the users, we NEED the ability to delete orders from the control panel. I am [looking at fingers] this close to pulling all support for Magento over this single issue, that’s how important yet ridiculous that it is. Obviously I am not the only one frustrated with this!

 
Magento Community Magento Community
Magento Community
Magento Community
 
timpea
Member
 
Total Posts:  68
Joined:  2007-09-03
 

Hi,

I would be happy if I could just VOID a completed order.  If you need to delete all your test orders before going live it is simple enough to delete the orders out of the database.

Cheers
Tim

 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Hi guys,

Has this been fixed in 1.1.8?
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
ZXIdo
Jr. Member
 
Total Posts:  17
Joined:  2008-03-05
 

This feature (a button...) has to be in 1.2.0 for the release to be worth its name!

 
Magento Community Magento Community
Magento Community
Magento Community
 
montpro
Member
 
Avatar
Total Posts:  50
Joined:  2008-12-24
 

Well I cant see it in 1.2!

 
Magento Community Magento Community
Magento Community
Magento Community
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 

My order area is a mess… each time I upgrade, I add a new payment method, or empty cache, I make a test order… I am able to cancel all of them, but it’s really annoying to have all tests orders mixed with real ones.

You are complaining to delete those orders before going live, BUT once you open your store, you still need each day or two to make test orders.

Please.... add this feature pleaseee!!!  downer

 
Magento Community Magento Community
Magento Community
Magento Community
 
afernander
Jr. Member
 
Total Posts:  1
Joined:  2009-01-01
Bahamas
 

it makes sense to never delete an order from a commerce software, but i am sure you can add button features in that works something like this or better:

1- for testing gateway eg.. 2CO, store only super-admins account can do it from the front/ a check box allows for super-admin to state he only wants a demo transaction made at the time he completes the checkout process. Remember after every upgrade you want to make sure the store is still working.

2- demo testing to gateway is void or canceled.

3- it does not affect your stats report in any way

4- recorded is recorded in DB as a different kind of transaction

5- it can be moved from being an Order to a transaction ..... like a quote is not a sales order but a recorded transaction.

6- on the forum they really mean well and wish to make the project better ... at least make an official statement on where you stand for clarification at least until the next major release Eg. ver 1.5 or 2.0 on this matter..

Please.................................

 
Magento Community Magento Community
Magento Community
Magento Community
 
Anjanesh
Sr. Member
 
Avatar
Total Posts:  136
Joined:  2008-03-15
Mumbai, India
 

Some table names got changed ? sales_quote_* to sales_flat_quote_*

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_quote_payment`;
TRUNCATE `sales_flat_quote_shipping_rate`;
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_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_quote_paymentAUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_shipping_rateAUTO_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;

TRUNCATE `eav_entity_store`;
ALTER TABLE  `eav_entity_storeAUTO_INCREMENT=1;
Tested in Magento 1.1.8
 
Magento Community Magento Community
Magento Community
Magento Community
 
elfling
Enthusiast
 
Avatar
Total Posts:  901
Joined:  2008-10-21
 

Well, I’m starting to experience one of our sites getting extremely high volumes of customers and order rates. Its only been since September, but the cancelled orders began to bug me, so going through and deleting in the mysql was the only option I had left. Its slow, its boring and its pointless.

From what I can tell a delete button that executes this command in the database is what is required (until it changes)

set @increment_id='**********';
select @order_id:=entity_id from sales_order where increment_id=@increment_id;
delete from sales_order_entity where entity_id=@order_id or parent_id=@order_id
delete from sales_order where increment_id=@increment_id;

something like delete.php that contains something like this

if ( $type == "Delete"
$query 
"DELETE FROM SALES_ORDER WHERE  INCREMENT_ID= " $increment_id
$query "DELETE FROM SALES_ORDER_ENTITY WHERE  ENTITY_ID= " $order_id or parent_id=@order_id

echo $query;

With this in invoice.php

delete.onClick = function(text){     
        
if(live_button){             
          
var Da = new Date(); 
          
       var 
tmp "/delete.php?pr=Delete" 
      
"&id;=" input1.getControlText() + 
                  
"&m;="  Da.getTime();    
          
output.setControlText(tmp);    
          
sendRequest(tmp);        
               
pausecomp(1250);  
          
load("invoice.php?");   
        

}
;
and then stick something like this into the template

<form name="delete" action="delete.php" method="POST">
<input type="hidden" name="deleteorder" value="<?php echo $order_id; ?>"/>
<input type="submit" name="deleteorder" value="Delete"/>
</form>

Well anyways, thats the basics of it, but after starting to plod through all the files to do this, I really lost the will to do it. Might look into this issue more next month when I have more time.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kylelnsn
Jr. Member
 
Total Posts:  9
Joined:  2009-01-03
 

Surely this is easy enough to do, just need the magento team to implement it! im a relatively new user and have created one order and need to delete it! surely we can see a revision for this asap?

Kyle

 
Magento Community Magento Community
Magento Community
Magento Community
 
UrKo
Jr. Member
 
Total Posts:  22
Joined:  2008-04-04
 

Would be great to only delete the ones that are cancelled. Im sure that even customers dont like to see in its account the order link that was cancelled…
So maybe a delete button only for cancelled orders???

 
Magento Community Magento Community
Magento Community
Magento Community
 
popthestack
Jr. Member
 
Avatar
Total Posts:  9
Joined:  2008-10-14
 

*bump*

Seriously?  You can’t delete orders without messing with the database?  I work with databases all day long and can do this easily, but seriously.  WHAT ON EARTH?

I try not to use all caps in forums very often (unless I’m joking around). So I really mean it when I say “WHAT ON EARTH?”

Varien, I can think of a whole bunch of reasons why you might want to leave orders there forever, but seriously.  Fix it.

If nothing else, maybe implement some sort of soft delete.

smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
elfling
Enthusiast
 
Avatar
Total Posts:  901
Joined:  2008-10-21
 

If you look at products and see how the delete button works there, you could probably utilise the technique into orders with some adjustments

 
Magento Community Magento Community
Magento Community
Magento Community
 
ADoppel
Jr. Member
 
Avatar
Total Posts:  14
Joined:  2008-12-25
 

This is not an accounting program, we should be able to delete whatever we want! There are probably rules in some countries for keeping all orders and stuff, but then the owner of the store should be smart enough to not delete them. Not giving us the option to delete orders is not a good solution in my opinion.

 
Magento Community Magento Community
Magento Community
Magento Community
 
stewdawg35
Member
 
Total Posts:  41
Joined:  2007-12-10
 

I agree, we don’t want 100 test orders in our cart when we go live, it makes accounting hard and it makes accurate reporting even more difficult. Does anyone know of a fix to this?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top