
Clearing down test orders in Ubercart
Setting up and testing a Drupal 6 + Ubercart site with a payment service provider can result in a lot of test orders on the system so here's a quick procedure for clearing them down before handing the site over to the client.
Use at your own risk and ensure you have a back up of your database before you start!
Back up your database.
No really, back up your database, if you make a mistake here your data is gone bye-bye!
Okay, now we can begin.
We'll be using the TRUNCATE TABLE command which in most instances drops and re-creates the table with the original schema preserved.
These are the commands to enter at the MySQL command line:
USE `your_database`; TRUNCATE TABLE uc_order_admin_comments; TRUNCATE TABLE uc_order_comments; TRUNCATE TABLE uc_order_line_items; TRUNCATE TABLE uc_order_log; TRUNCATE TABLE uc_order_products; TRUNCATE TABLE uc_order_quotes; TRUNCATE TABLE uc_orders;
And that's it for the clear down. I'd recommend entering a few more orders to make sure nothing got broke and then perform the clear down one last time.
Ubercart 6.x-2.0 was the current version at the time of writing.
tags: d6, drupal, mysql, ubercart
things to do: add new comment
Comments

Hi George, we're using RBS
Hi George, we're using RBS Worldpay so the uc_worldpay module came in real handy!
Good luck with your site :)
things to do: reply




I design and develop web sites built with 





Oooo thanks for the tip, my
Posted by Anonymous on Fri, 23/10/2009 - 22:49.
Oooo thanks for the tip, my first Ubercart site is hopefully going up next week. Couldn't have come at a better time!
Which payment gateway are you using?
Cheers
George
(Fellow Parisian DC'er!)
things to do: reply