le-phenix Posted January 5, 2010 Share Posted January 5, 2010 helloI have just installed prestashop for my small company and I was trying some orders now I want to remove orders that I tried but it seems that I can't do it can any one help me plz Link to comment Share on other sites More sharing options...
rocky Posted January 5, 2010 Share Posted January 5, 2010 See this topic. Link to comment Share on other sites More sharing options...
le-phenix Posted January 5, 2010 Author Share Posted January 5, 2010 See this topic. thank you very much but that doesn't help is there any thing else? Link to comment Share on other sites More sharing options...
rocky Posted January 5, 2010 Share Posted January 5, 2010 If you don't have access to phpMyAdmin to execute the query in that post, you can open tabs/AdminOrders.php in your renamed admin directory, then find this line (it should be line 23): $this->colorOnBackground = true; Then copy the below line on a new line after it: $this->delete = true; You can then go to the Order tab as usual and a delete button should appear for each order. Link to comment Share on other sites More sharing options...
le-phenix Posted January 5, 2010 Author Share Posted January 5, 2010 If you don't have access to phpMyAdmin to execute the query in that post, you can open tabs/AdminOrders.php in your renamed admin directory, then find this line (it should be line 23):$this->colorOnBackground = true; Then copy the below line on a new line after it: $this->delete = true; You can then go to the Order tab as usual and a delete button should appear for each order. THANK YOU SO MUCH THIS ONE HELP REALY Link to comment Share on other sites More sharing options...
D-fox Posted January 5, 2010 Share Posted January 5, 2010 with delete test orders module you may do it.check this thread http://www.prestashop.com/forums/viewthread/24710 Link to comment Share on other sites More sharing options...
D-fox Posted January 5, 2010 Share Posted January 5, 2010 and if you want to test while in production you may delete cancelled orders with module in this thread http://www.prestashop.com/forums/viewthread/18231for a basket or complete reset, Prestastore sells a specialized module. Link to comment Share on other sites More sharing options...
brandonc503 Posted February 10, 2010 Share Posted February 10, 2010 do these reset the auto increment keys too? and are all the 'orders' info stored in the ps_orders tables? ie type and lang i think.. im asking cause i am wondering if i can delete certain table types insted of all the tables.. like just the orders to start over or all my categories to start over just those.. i read that PS will soon have db export for just your catelog. Link to comment Share on other sites More sharing options...
brandonc503 Posted February 10, 2010 Share Posted February 10, 2010 and i just made the change.. was on 25 for me. eh.. on orders tab nothin happened im using 1.2.5 final if that matters Link to comment Share on other sites More sharing options...
D-fox Posted February 10, 2010 Share Posted February 10, 2010 trick database at your own risk.. Link to comment Share on other sites More sharing options...
nerdherd Posted April 9, 2010 Share Posted April 9, 2010 hi what do you mean trick database at own risk? Is it risky to delete orders this way? Also i read in one of the threads that it only deletes from the table. In addition in one thread a prestateam member says you cannot delete orders in prestashop. When the order is deleted in this way will the invoice and totals be adjusted also. Link to comment Share on other sites More sharing options...
nerdherd Posted April 9, 2010 Share Posted April 9, 2010 Also is it safer to use the module for deleting orders will there still be a risk of "tricking the database" Also, is there an english version for the module mentioned above. Link to comment Share on other sites More sharing options...
brandonc503 Posted April 23, 2010 Share Posted April 23, 2010 its just that in the table when a row is created its given a key #. 1 then 2 then 3 and so on.. if you just delete the rows from the table the keys do not reset, you would then have an empty table but the next row created will be what ever was next. also, when records are created in the database some make entries in multiple tables.. so you remove record 33 from orders but the associated record in another table will stay there. so even if you reset the keys, which you can, you may make a new 33 in orders and its associated with wrong record in other table.id read up on how to manipulate tables in case you do want to mess with them.. also look for a module i have heard of that will remove your 'test' order, or any others you may want to remove, correctly.if you are going to mess with them yourself post a thread asking which tables are used when creating a new order so you can 'clean up' all the tables.a few of us, very few, that have started a channel in irc chat. if youd like to check in we would be glad to help where we can. the channel is simply /prestashopgood luck. Link to comment Share on other sites More sharing options...
Pixel Posted July 24, 2010 Share Posted July 24, 2010 If you don't have access to phpMyAdmin to execute the query in that post, you can open tabs/AdminOrders.php in your renamed admin directory, then find this line (it should be line 23):$this->colorOnBackground = true; Then copy the below line on a new line after it: $this->delete = true; You can then go to the Order tab as usual and a delete button should appear for each order. Bear in mind this extra line of code doesn't remove the details of the order from ALL of the order-related tables - such as order_history, order_detail etc.It only removes (it seems) the data from the orders table, so if you use it, you'll then have a lot of orphaned data in the other tables that won't be linked to an order_id. Link to comment Share on other sites More sharing options...
the_novice Posted July 25, 2010 Share Posted July 25, 2010 Bear in mind this extra line of code doesn't remove the details of the order from ALL of the order-related tables - such as order_history, order_detail etc.It only removes (it seems) the data from the orders table, so if you use it, you'll then have a lot of orphaned data in the other tables that won't be linked to an order_id. will this cause any problems though? i've inserted the code and deleted the test order so it's working fine.i also want to delete a load of cancelled orders and some tests i placed to tidy up my admin. if all the code does is delete the order from the page with no other effects such as stock being added then it's perfect for me. Link to comment Share on other sites More sharing options...
Recommended Posts