News:

Support the VirtueMart project and become a member

Main Menu

Delete all the orders

Started by m.davide82, May 03, 2018, 22:30:04 PM

Previous topic - Next topic

m.davide82

Hello,

is there any way to delete in batch all the orders?


Thanks,
Davide

Studio 42

Using admin side, you can select all and delete.
A little trick : when you display the order adding at end of the url &limit=1000 display 1000 orders.
But 1000 is perhpas to many, &limit=250 is more save

m.davide82

Yes, I know, thanks.
But if I put 250, the system doesn't delete them.

I have about 15.000 orders!

AH

You can use phpmyadmin to truncate the date in the relevant tables:

Ensure you test on a test environment first and take a backup just in case.

If you dont know MYSQL or are not confident DONT DO THIS!!!!

TRUNCATE yourprefix_virtuemart_orders;
TRUNCATE yourprefix_virtuemart_order_calc_rules;
TRUNCATE yourprefix_virtuemart_order_histories;
TRUNCATE yourprefix_virtuemart_order_items;
TRUNCATE yourprefix_virtuemart_order_userinfos;
TRUNCATE yourprefix_virtuemart_invoices;

These tables below may or may not exist so look to see what you have and substitute the relevant names ( depend on what payment and shipping plugins you have)

TRUNCATE yourprefix_virtuemart_payment_plg_paypal;
TRUNCATE yourprefix_virtuemart_payment_plg_standard;
TRUNCATE yourprefix_virtuemart_shipment_plg_weight_countries;
TRUNCATE yourprefix_virtuemart_order_item_histories;

In addition - you will potentially have invoices in the VMfiles directory - these should be "moved"
Regards
A

Joomla 4.4.5
php 8.1

m.davide82


razor7

Thanks! exactly what I was looking for! Thanks!
MGS Creativa - VirtueMart Payment Plugin Experts
http://www.mgscreativa.com

Take a look at our downloads section for VirtueMart payment plugins and mouch more!
http://www.mgscreativa.com/en/online-store