fgomez Posted December 17, 2017 Share Posted December 17, 2017 Hi, anyone knows how to delete test orders? Link to comment Share on other sites More sharing options...
nadie Posted December 17, 2017 Share Posted December 17, 2017 14 minutes ago, fgomez said: Hi, anyone knows how to delete test orders? Hi @fgomez You can use the free module of the user @vekia: https://www.prestashop.com/forums/topic/191037-free-delete-orders-module/ Sorry for my English, Link to comment Share on other sites More sharing options...
fgomez Posted December 17, 2017 Author Share Posted December 17, 2017 ,Doesn't erase orders i put the order id and i clicked to erase, but still remains Link to comment Share on other sites More sharing options...
nadie Posted December 18, 2017 Share Posted December 18, 2017 11 hours ago, fgomez said: ,Doesn't erase orders i put the order id and i clicked to erase, but still remains In principle the module of @vekia, it should work. What version of Prestashop do you use? I understand that they are orders that you have made in your store to test, right? Sorry for my English, ----------------------------------------- PD: Other option ->module (the prestashop) (is free) called Prestashop Cleaner (Delete all orders and customers) Link to comment Share on other sites More sharing options...
fgomez Posted December 18, 2017 Author Share Posted December 18, 2017 (edited) i'am using prestashop version 1.6.1.17 Edited December 18, 2017 by fgomez (see edit history) Link to comment Share on other sites More sharing options...
13thjoker Posted December 18, 2017 Share Posted December 18, 2017 (edited) hi, Fgomez, please help us get your version. Log into backend it should list you the version there see my screenshot. https://gyazo.com/3a441c532b6af08d82cf2f2fb61705b0 I hope this gives you enough info to find you prestashop version. Regards 13th joker Edited December 18, 2017 by 13thjoker (see edit history) Link to comment Share on other sites More sharing options...
Fedra Posted December 18, 2017 Share Posted December 18, 2017 Hello. If the above solution did not help you, earlier I have used this tutorial to delete orders I made for test. 1 Link to comment Share on other sites More sharing options...
rozhawni Posted October 12, 2018 Share Posted October 12, 2018 (edited) If you are in the EU, read the information from the prestashop documentation below: "YOU CANNOT DELETE AN ORDER. It is illegal to be able to remove payment or ordering information and/or invoice information from a business in Europe. Therefore, implementing a "Delete" button for orders would render PrestaShop illegal in Europe. To safely delete the default order, install the "Database Cleaner" module (which is available in the default installation since v1.5.4), open its configuration screen and check the "Orders and customers" box before you click on the "Delete orders & customers" button." source: http://doc.prestashop.com/display/PS16/Orders Just because you can delete orders easily, doesn't mean you should! But for educational purposes only...... here is how to activate Delete as an option in Orders in Back Office. Go to file: controllers/admin/AdminOrdersController.php add: $this->addRowAction('delete'); right beneath: $this->delete = false; and also change false to true: $this->delete = true; final code should look like this: public function __construct() { $this->bootstrap = true; $this->table = 'order'; $this->className = 'Order'; $this->lang = false; $this->addRowAction('view'); $this->explicitSelect = true; $this->allow_export = true; $this->delete = true; $this->addRowAction('delete'); Save file and refresh Orders in Back Office. Works in PS 1.7.4.3 (confimed) Be careful though!! The only way to revert deleted orders is to restore database through backups! if you don't need it, then comment it out to prevent mistakes! /**$this->addRowAction('delete');*/ Edited October 19, 2018 by rozhawni (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted October 12, 2018 Share Posted October 12, 2018 be warned!!! never delete orders/customers etc.... simply cancel the orders.... following some of the advice here and other threads you open yourself to all kinds of issues... NEVER DELETE ANYTHING unless you 'really are expert in PS' and even then we don't delete stuff... 1 Link to comment Share on other sites More sharing options...
Surffari Posted October 28, 2019 Share Posted October 28, 2019 On 10/12/2018 at 3:33 AM, rozhawni said: If you are in the EU, read the information from the prestashop documentation below: "YOU CANNOT DELETE AN ORDER. It is illegal to be able to remove payment or ordering information and/or invoice information from a business in Europe. Therefore, implementing a "Delete" button for orders would render PrestaShop illegal in Europe. To safely delete the default order, install the "Database Cleaner" module (which is available in the default installation since v1.5.4), open its configuration screen and check the "Orders and customers" box before you click on the "Delete orders & customers" button." source: http://doc.prestashop.com/display/PS16/Orders Just because you can delete orders easily, doesn't mean you should! But for educational purposes only...... here is how to activate Delete as an option in Orders in Back Office. Go to file: controllers/admin/AdminOrdersController.php add: $this->addRowAction('delete'); right beneath: $this->delete = false; and also change false to true: $this->delete = true; final code should look like this: public function __construct() { $this->bootstrap = true; $this->table = 'order'; $this->className = 'Order'; $this->lang = false; $this->addRowAction('view'); $this->explicitSelect = true; $this->allow_export = true; $this->delete = true; $this->addRowAction('delete'); Save file and refresh Orders in Back Office. Works in PS 1.7.4.3 (confimed) Be careful though!! The only way to revert deleted orders is to restore database through backups! if you don't need it, then comment it out to prevent mistakes! /**$this->addRowAction('delete');*/ In 1.7.5.0 there is no: $this->delete = true/false; There is: $this->deleted = false; Changing that or adding the suggested line results in an error. By not touching the above, and only adding the other suggested line (this->addRowAction('delete');) the "Delete"-option appears on the View button Link to comment Share on other sites More sharing options...
PCQUATRO Posted October 30, 2019 Share Posted October 30, 2019 (edited) On 12/17/2017 at 8:34 PM, fgomez said: Hi, anyone knows how to delete test orders? You can use this module, it´s free... "PrestaShop Cleaner can only be managed from the back office. It allows you to roughly clean your store by deleting your whole catalog, orders, and customers. For example, this module allows you to suppress all demo data in one go. But this module must be used carefully: once you delete it all, there is no possible rollback. Everything is removed for good. " Best Regards Edited October 30, 2019 by PCQUATRO (see edit history) Link to comment Share on other sites More sharing options...
RichOfOtakau Posted December 29, 2019 Share Posted December 29, 2019 On 10/29/2019 at 11:43 AM, Surffari said: In 1.7.5.0 there is no: $this->delete = true/false; There is: $this->deleted = false; Changing that or adding the suggested line results in an error. By not touching the above, and only adding the other suggested line (this->addRowAction('delete');) the "Delete"-option appears on the View button Confirm that this seems to work. El Patron, any issues with this other than that you shouldn't do it (i.e. database, is it a proper delete/drop). Link to comment Share on other sites More sharing options...
selectshop.at Posted December 29, 2019 Share Posted December 29, 2019 This old tutorial is for PS 1.6. and not PS 1.7.!!! PScleaner module is also for PS 1.5. and PS 1.6. and not for PS 1.7.!! @RichOfOtakau Follow El Patron's advice and instead of to delete orders/customers in PS 1.7. simply disable/cancel them. On 10/12/2018 at 8:11 PM, El Patron said: never delete orders/customers etc.... simply cancel the orders.... EDIT: in Spanish forum section I found a reworked pscleaner module, which seems to work with PS 1.7.6 versions. You can give a try: https://www.prestashop.com/forums/topic/565014-problemas-al-actualizar-el-módulo-pscleaner/?tab=comments#comment-3155122 On 9/24/2019 at 4:47 AM, catrinis said: Confirmo de que funciona perfectamente en 1.7.6 el archivo pscleaner.zip 41.83 kB · 928 downloads Pueden bajar con tranquilidad el archivo y usarlo con confianza. Ha dejado completamente limpio todo. Muchas gracias al autor y colaboradores 1 Link to comment Share on other sites More sharing options...
selectshop.at Posted December 29, 2019 Share Posted December 29, 2019 For shops in production the only and correct way is to cancel the orders, instead of to delete them. Orders are documents, which by law should be maintained accessible for x years, therefore you will not find this option. Read also some posts before in here undermining why you will not find this option. BTW: I found that post by accident and an approval queue moderation/task. Pure coincidence. You can install Prestashop also without samples, so without any customer, product or order in database. This is the best way for shops in production. For to test, install a TEST version before, with samples and on where you can play with the features. Is your choice for what you need Prestashop: for to play, or for to maintain it in production. Link to comment Share on other sites More sharing options...
Eutanasio Posted February 14, 2020 Share Posted February 14, 2020 On 12/29/2019 at 1:33 PM, selectshop.at said: For shops in production the only and correct way is to cancel the orders, instead of to delete them. Orders are documents, which by law should be maintained accessible for x years, therefore you will not find this option. Read also some posts before in here undermining why you will not find this option. BTW: I found that post by accident and an approval queue moderation/task. Pure coincidence. You can install Prestashop also without samples, so without any customer, product or order in database. This is the best way for shops in production. For to test, install a TEST version before, with samples and on where you can play with the features. Is your choice for what you need Prestashop: for to play, or for to maintain it in production. What about in the case of errors caused by the orders? I have an issue with ASM that I tried to fix wrong reserved stock values by mass changing all orders with a "Delivery" status that didn't have the "consider order as shipped" option market, to a new "Delivered" status I created with that option marked. Now I have an ERROR 500 if I try to load order_list containing old orders from 2016 or earlier. I guess it may be a problem of order compatibility as in 2016 I used to have PS 1.6.x I guess and now I use 1.7.6 Does anyone know what could I do? I "don't mind" at this point the error as much as the need to fix the ASM in order to fix my stock level problems on PS Link to comment Share on other sites More sharing options...
El Patron Posted February 15, 2020 Share Posted February 15, 2020 hire a developer by posting in jobs section, or don't pull up orders from 2016, or turn on ps debug, get the real error and create a new post...never post here you get 500, you need to post underlying error, else it's no help Link to comment Share on other sites More sharing options...
Eutanasio Posted February 15, 2020 Share Posted February 15, 2020 8 hours ago, El Patron said: hire a developer by posting in jobs section, or don't pull up orders from 2016, or turn on ps debug, get the real error and create a new post...never post here you get 500, you need to post underlying error, else it's no help I did what you suggested and with some googleing I found the weird reason of my problemhttps://github.com/PrestaShop/PrestaShop/issues/14595#issuecomment-510884182 1 Link to comment Share on other sites More sharing options...
Isaac Azpilcueta Posted May 12, 2020 Share Posted May 12, 2020 On 10/28/2019 at 4:43 PM, Surffari said: In 1.7.5.0 there is no: $this->delete = true/false; There is: $this->deleted = false; Changing that or adding the suggested line results in an error. By not touching the above, and only adding the other suggested line (this->addRowAction('delete');) the "Delete"-option appears on the View button This works to me!, thank you, i'm using PS 1.7.6.2 Link to comment Share on other sites More sharing options...
El Patron Posted May 13, 2020 Share Posted May 13, 2020 there is reason PS does no provide delete order 1) admins can steal money 2) if not coded for decencies you can break your database as that delete function does not clean up order id's in other tables. 1 Link to comment Share on other sites More sharing options...
jetway Posted May 13, 2020 Share Posted May 13, 2020 Why do you want to delete them? If you do a test order, why not just cancel? The Item gets released for purchase again and all is good. 1 Link to comment Share on other sites More sharing options...
PrestaSOO Posted January 23, 2021 Share Posted January 23, 2021 If you want to delete your test orders, you can try DELTEX for free. It helps you to delete 1 order or all orders in seconds. When we're developing ChargeMe module, we generated many test orders and DELETEX helps me a lot. Link to comment Share on other sites More sharing options...
TecMikro Posted April 6, 2021 Share Posted April 6, 2021 La opción de eliminar pedidos es útil cuando se trata de borrar algun pedido con errores (en mi caso un pedido quedó con error sin ningún estado asignado). Para eliminarlo usé el módulo Delete Orders Free v1.5.3 (probado exitosamente en Prestashop 1.7.7.3) Link a Delete Orders Free Link to comment Share on other sites More sharing options...
gochi88 Posted September 4, 2021 Share Posted September 4, 2021 On 4/6/2021 at 10:11 AM, TecMikro said: La opción de eliminar pedidos es útil cuando se trata de borrar algun pedido con errores (en mi caso un pedido quedó con error sin ningún estado asignado). Para eliminarlo usé el módulo Delete Orders Free v1.5.3 (probado exitosamente en Prestashop 1.7.7.3) Link a Delete Orders Free Thanks sir it was helpful for me. Link to comment Share on other sites More sharing options...
El Patron Posted December 23, 2021 Share Posted December 23, 2021 Closing, open new post if not answered to you liking above. Link to comment Share on other sites More sharing options...
Recommended Posts