Forums / General Questions / Help! I've deleted all my orders.

Help! I've deleted all my orders.

Locked

Views: 1,204

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
28 Mar 2008, 10:51 PM
#1
peter_homann avatar

peter_homann

Zen Follower

Join Date:
Jun 2006
Location:
Melbourne, VIC
Posts:
106
Plugin Contributions:
0

Help! I've deleted all my orders.

Hi,

I've accidentally deleted all my orders while using pdf orders :oops:. I did a backup of my sql database 2 days ago so all is not lost.

My question is "How do I just restore the orders from the backup file"? Is it a matter of editing the backup file?, if so can anyone provide advice on how to do this.

Also, what will hapen to new orders that come in before I do the resore, will they be overwritten?

Cheers,

Peter

29 Mar 2008, 12:50 AM
#2
daneh avatar

daneh

Zen Follower

Join Date:
Dec 2007
Location:
Southern Maine
Posts:
268
Plugin Contributions:
0

Re: Help! I've deleted all my orders.

If you go to your Cpanel, there should be a way to restore the database. It should be under backups.

29 Mar 2008, 10:24 PM
#3
peter_homann avatar

peter_homann

Zen Follower

Join Date:
Jun 2006
Location:
Melbourne, VIC
Posts:
106
Plugin Contributions:
0

Re: Help! I've deleted all my orders.

daneh:

If you go to your Cpanel, there should be a way to restore the database. It should be under backups.

Hi, Thanks for the reply.

I was hoping to not have to restore the whole database, just restore the orders I've deleted. Looking at the backup file, I was hoping that I could just edit out everything except the orders part?

Cheers,

Peter.

29 Mar 2008, 10:32 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Help! I've deleted all my orders.

If you have advanced understanding of database concepts, you can extract the required records from the appropriate tables, and copy them across. However, how do you reconcile the fact that order numbers may now be duplicated? You'll have to renumber some things accordingly. Your customers' email receipts will point to incorrect places, but at least their My Account area will have the new details.

Database schema reference: http://www.zen-cart.com/wiki/index.php/Developers_-_Database_Schema#Order_History

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Mar 2008, 11:27 PM
#5
peter_homann avatar

peter_homann

Zen Follower

Join Date:
Jun 2006
Location:
Melbourne, VIC
Posts:
106
Plugin Contributions:
0

Re: Help! I've deleted all my orders.

DrByte:

If you have advanced understanding of database concepts, you can extract the required records from the appropriate tables, and copy them across. However, how do you reconcile the fact that order numbers may now be duplicated? You'll have to renumber some things accordingly. Your customers' email receipts will point to incorrect places, but at least their My Account area will have the new details.

Database schema reference: http://www.zen-cart.com/wiki/index.php/Developers_-_Database_Schema#Order_History

Hi,

I think that is the answer I needed. I think I'll restore it and then add in the data since the last backup. I can do this from the email confirmations re: orders and new customers.

I appreciated the prompt replies by yourself and Daneh.

Cheers,

Peter.