Best method for removing orders from the system

Phoca Cart - complex e-commerce extension
User avatar
dmlwebal
Phoca Professional
Phoca Professional
Posts: 238
Joined: 18 Sep 2019, 12:49

Best method for removing orders from the system

Post by dmlwebal »

Hi

I have a two clients that sell exactly the same products. So as part of the project I can copy one full Joomla Phoca Cart installation across to new hosting, but, I need to remove the Phoca Cart Orders from the destination domain.

Is it safe to run this as a query on the database? or will this create problems?

What is the best method?

David
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Best method for removing orders from the system

Post by Jan »

Hi, you need to run it in database and truncate the table because it includes autoincrement column - id. And if you want to start to count orders from 1, the autoincrement needs to be reset.

And, yes, this is very problematic, because another tables are linked, it is at least the following:

Image

which even needs to be emptied and reset.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Shuffle
Phoca Member
Phoca Member
Posts: 32
Joined: 02 Dec 2021, 19:49

Re: Best method for removing orders from the system

Post by Shuffle »

Thanks. This info is very helpful for testing. :twisted:
Perhaps one should not truncate phocacart_order_statuses, if one has definded own content before. :wink:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Best method for removing orders from the system

Post by Jan »

Hi, yes, if you have own order statuses done, it is OK to not remove them.

Jan
If you find Phoca extensions useful, please support the project
Post Reply