Knowledgebase

Home » Item #827

Deleting the test data in CactuShop

Item: #827
Date: 29 Mar 2004
Applies to
v6

Question

I want to clean the CactuShop database before I start entering in my data. Can I just delete all the records in the database?

Answer

A lot of the data - languages, countries, shipping methods, currencies, config settings etc - need to exist in the database for CactuShop to function correctly.

In MS SQL, you can run the following code on the database to clear the tables that contain 'test' user and product data (without removing important records such as config settings):

DELETE FROM tblCactuShop1AdminLog
DELETE FROM tblCactuShop1AffiliateLog
DELETE FROM tblCactuShop1AffiliatePayments
DELETE FROM tblCactuShop1Attributes
DELETE FROM tblCactuShop1AttributeValues
DELETE FROM tblCactuShop1Categories
DELETE FROM tblCactuShop1CategoryHierachy
DELETE FROM tblCactuShop1Coupons
DELETE FROM tblCactuShop1CustomerGroupPrices
DELETE FROM tblCactuShop1CustomerGroups
DELETE FROM tblCactuShop1Customers
DELETE FROM tblCactuShop1InvoiceRows
DELETE FROM tblCactuShop1OptionGroups
DELETE FROM tblCactuShop1Options
DELETE FROM tblCactuShop1Orders
DELETE FROM tblCactuShop1ProductCategoryLink
DELETE FROM tblCactuShop1ProductOptionGroupLink
DELETE FROM tblCactuShop1ProductOptionLink
DELETE FROM tblCactuShop1Products
DELETE FROM tblCactuShop1ProductStats
DELETE FROM tblCactuShop1Promotions
DELETE FROM tblCactuShop1QuantityDiscounts
DELETE FROM tblCactuShop1RelatedProducts
DELETE FROM tblCactuShop1Reviews
DELETE FROM tblCactuShop1SaveBasket
DELETE FROM tblCactuShop1Suppliers
DELETE FROM tblCactuShop1VersionOptionLink
DELETE FROM tblCactuShop1Versions
DELETE FROM tblCactuShop1VersionSalesStats
DELETE FROM tblCactuShop1WishList

You will then also need to delete all the files in the folders within the 'uploads' folder - the images and downloadable files. Make sure you keep the directory stucture - leaving the images_products, images_products_large folders etc - intact.

Can't find the answer you need? Click here to open a support ticket.

« Back