Reset Prestashop customers and orders

If you use the Prestashop e-commerce shopping cart for your webstore, and need to reset the customers and orders tables once the store goes live (after all of your test orders), here is the following SQL to make clean your test customers and orders from the database.

TRUNCATE TABLE `ps_customer`;
TRUNCATE TABLE `ps_customer_group`
TRUNCATE TABLE `ps_address`;
TRUNCATE TABLE `ps_orders`;
TRUNCATE TABLE `ps_order_detail`;
TRUNCATE TABLE `ps_order_discount`;
TRUNCATE TABLE `ps_order_history`;
TRUNCATE TABLE `ps_message`;
TRUNCATE TABLE `ps_cart`;
TRUNCATE TABLE `ps_cart_product`;
TRUNCATE TABLE `ps_cart_discount`; 

Run this via a tool like PhpMyAdmin in the SQL tab, and your store customers and orders will be reset.... needless to say that you only want to do this if you want to reset all customers and their orders after testing, and before your store goes live.

If you just want to delete one order (and dont ask my why there is not a delete order button in the admin), you can do that by changing the part of the URL from vieworder to deleteorder when viewing the order details in admin.

eg:

tab=AdminOrders&id_order=2&deleteorder&token=

Hope this tip helps!
Amplify