Post by ideep13 » Sun Jun 16, 2013 12:53 am

Hi,

I made a mistake and I pressed truncate table (order_id table) and everything is gone now..

is it possible to reverse this action? i need 3 orders back?

if not, is it possible to manually enter orders? How?

Your advice is much appreciated,

deep

User avatar
Active Member

Posts

Joined
Mon Jun 18, 2012 2:47 am

Post by ideep13 » Sun Jun 16, 2013 12:54 am

oh and btw, under order history table, everything is still visible

User avatar
Active Member

Posts

Joined
Mon Jun 18, 2012 2:47 am

Post by ideep13 » Mon Jun 17, 2013 11:44 pm

I really don't want to be annoying, but is there anyone that can help me?

User avatar
Active Member

Posts

Joined
Mon Jun 18, 2012 2:47 am

Post by webvet » Mon Jun 17, 2013 11:54 pm

Not sure it will work - but if you have printed copies of the orders, and want to keep the original order_id numbers etc then you could try forcing the orders in using phpmyadmin and replacing them in the 'order' table? You will need to refer to other tables for some of the columns but should be fairly easy to do.

Obviously backup everything in your database first, you don't want to loose anymore data!

(If you replace them manually using Admin > Sales > Orders then you will get new order_id's due to the auto_increment feature of the database.)

Genuine, Honest Opencart Support @ http://webvetservices.com


User avatar
Active Member

Posts

Joined
Thu May 14, 2009 2:04 am
Location - Shropshire, UK

Post by ideep13 » Wed Jun 19, 2013 5:26 am

Thank you so much. :) But now after I deleted everything I have found out, after creating a bogus order opencart itself is adding three more items on itself. Calculation is all wrong. But the thing is mixed up after the order is complete. First all data is correct, and after I want to check the order in dashboard and on email - data is added by itself. This is really strange!
Last edited by ideep13 on Tue Sep 23, 2014 12:17 am, edited 1 time in total.

User avatar
Active Member

Posts

Joined
Mon Jun 18, 2012 2:47 am

Post by webvet » Wed Jun 19, 2013 7:14 am

I suspect your database is now corrupt and so when trying to retrieve information about orders, something is going wrong and it is getting incorrect information returned.

Do you have a recent database backup? If you haven't taken on, may be worth checking whether your webhost has.

Genuine, Honest Opencart Support @ http://webvetservices.com


User avatar
Active Member

Posts

Joined
Thu May 14, 2009 2:04 am
Location - Shropshire, UK

Post by ideep13 » Wed Jun 19, 2013 1:33 pm

unfortunately no backup at all... i only pressed truncate table in order_id and order_history.. nothing else.

the first order from my costumer is ok.. but than the second one is wrong and its adding a few more items on itself.. now i can't remember did i do smth or pressed smth in database additionally..

godaddy doesn't have a backup of my database, if I didn't backup myself.

User avatar
Active Member

Posts

Joined
Mon Jun 18, 2012 2:47 am

Post by webvet » Wed Jun 19, 2013 7:19 pm

Bad news :(

I think you are going to have to try and compare your current database with a completely clean install to see exactly what is happening. You can either do this yourself using a fresh install of the same Opencart version to your live store (e.g. set it up on a machine using a WAMP server of similar) or get someone else to do this for you?

Depending on whether your database has data you want to keep on it (customer details, product informatione etc) or not may influence how easy/difficult it is to restore...

Genuine, Honest Opencart Support @ http://webvetservices.com


User avatar
Active Member

Posts

Joined
Thu May 14, 2009 2:04 am
Location - Shropshire, UK
Who is online

Users browsing this forum: Bing [Bot], paulfeakins and 52 guests