VirtueMart Forum

VirtueMart General => About VirtueMart - not for support posts => Topic started by: Lord Akoa on August 06, 2004, 05:06:21 AM

Title: Quick way to wipe all products before CSV upload
Post by: Lord Akoa on August 06, 2004, 05:06:21 AM
QuoteIs there a quick way (SQL command maybe) that will wipe out all products and categories. I'm constantly updating my product line with new categories and wiping out old categories and I can manage this all by CSV uploads if I can delete Product and Categories this way.

Sorry to cross post here, :y32b4: :blink: I'm just surprised that noone knew the answer to this. I'm spending too much time hitting delete on each product and then deleting the categories when there are hundred of categories that have to change or be removed/added.  So obviously I am desperate for anyone to be able to help me with this problem.
Title: Re:Quick way to wipe all products before CSV uploa
Post by: Lord Akoa on August 06, 2004, 05:21:53 AM
Found the answer after looking again through the forum (searched on \"delete\").  SarvaiD Gave the answer in his request to have this as a feature within the product (which I highly recommend).

Here is the SQL code:
TRUNCATE TABLE mos_pshop_category;
TRUNCATE TABLE mos_pshop_category_xref;
TRUNCATE TABLE mos_pshop_product;
TRUNCATE TABLE mos_pshop_product_attribute;
TRUNCATE TABLE mos_pshop_product_attribute_sku;
TRUNCATE TABLE mos_pshop_product_category_xref;
TRUNCATE TABLE mos_pshop_product_price;