Post by AnonyMoose » Fri Sep 30, 2011 3:41 am

I've done some testing on my OC store, created dummy orders etc. and ideally I'd like to reset invoice numbers and order numbers before going live.

I used to do it by backing up DB, installing fresh opencart copy and importing only product data etc, but this involves quite a lot of tweaking extensions, adding changes to .php files I made etc.

Is there any easy way to achieve this? Thanks in advance for any suggestions!
Last edited by AnonyMoose on Fri Sep 30, 2011 11:07 pm, edited 1 time in total.

New member

Posts

Joined
Wed Jul 20, 2011 5:35 pm

Post by jcsmithy » Fri Sep 30, 2011 4:41 am

Run this in your SQL program

Code: Select all

TRUNCATE `order`;
TRUNCATE `order_download`;
TRUNCATE `order_history`;
TRUNCATE `order_option`;
TRUNCATE `order_product`;
TRUNCATE `order_total`;
this will completely clear the order tables, and also reset them.

Active Member

Posts

Joined
Fri Oct 01, 2010 9:54 pm

Post by AnonyMoose » Fri Sep 30, 2011 11:07 pm

Thank you for quick reply!

New member

Posts

Joined
Wed Jul 20, 2011 5:35 pm

Post by d3z1gnr » Fri Nov 11, 2011 4:58 am

Nice. Needed this right now!

Mike Little
Director / Developer / Makes the coffee
Creative Digital Limited
http://www.creativedigital.co.nz


User avatar
Active Member

Posts

Joined
Mon Jan 18, 2010 2:59 pm
Location - Auckland, New Zealand

Post by pltceat » Sat Nov 03, 2012 6:18 pm

jcsmithy wrote:Run this in your SQL program

Code: Select all

TRUNCATE `order`;
TRUNCATE `order_download`;
TRUNCATE `order_history`;
TRUNCATE `order_option`;
TRUNCATE `order_product`;
TRUNCATE `order_total`;
this will completely clear the order tables, and also reset them.

Can you explain how to do the above? I've very new to all of this and don't really understand how and where to run the SQL program. Thank you.

Newbie

Posts

Joined
Sun Sep 09, 2012 7:01 pm

Post by Saudi Bee » Sun Dec 30, 2012 12:37 pm

jcsmithy wrote:Run this in your SQL program

Code: Select all

TRUNCATE `order`;
TRUNCATE `order_download`;
TRUNCATE `order_history`;
TRUNCATE `order_option`;
TRUNCATE `order_product`;
TRUNCATE `order_total`;
this will completely clear the order tables, and also reset them.

Excellent !!! thank you very much

New member

Posts

Joined
Sat May 19, 2012 5:09 pm

Post by Saudi Bee » Sun Dec 30, 2012 12:40 pm

pltceat wrote:
jcsmithy wrote:Run this in your SQL program

Code: Select all

TRUNCATE `order`;
TRUNCATE `order_download`;
TRUNCATE `order_history`;
TRUNCATE `order_option`;
TRUNCATE `order_product`;
TRUNCATE `order_total`;
this will completely clear the order tables, and also reset them.

Can you explain how to do the above? I've very new to all of this and don't really understand how and where to run the SQL program. Thank you.
from you c panel , phpMyAdmin, go to your database , click on query icon above, a small window will appear,past the above code.

New member

Posts

Joined
Sat May 19, 2012 5:09 pm
Who is online

Users browsing this forum: No registered users and 48 guests