Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default deleting all data

    I don't suppose anyone has a batch file that deletes all customers, customer orders and products from a zen cart install?

    I've used another site as a template, which is good, but all the customers and products need to go and I don't want to leave fragments behind in related tables.

    Anyone?

  2. #2
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Delete all products, categories, manufacturers, etc from Easy Populate import

    OK, finally figured this out, been at it all day!

    These are the tables to delete when you copy an existing site to a new server as a template. to get rid of the existing customers, existing orders and existing products (and all the loose ends that are associated with them) just run this querry from PHPmyADMIN:

    PHP Code:
    DELETE FROM customers;
    DELETE FROM customers_admin_notes;
    DELETE FROM customers_basket;
    DELETE FROM customers_basket_attributes;
    DELETE FROM customers_info;
    DELETE FROM customers_wishlist;
    DELETE FROM products;
    DELETE FROM manufacturers;
    DELETE FROM manufacturers_info;
    DELETE FROM paypal;
    DELETE FROM paypal_payment_status;
    DELETE FROM paypal_payment_status_history;
    DELETE FROM paypal_session;
    DELETE FROM paypal_testing;
    DELETE FROM nochex_apc_transactions;
    DELETE FROM nochex_sessions;
    DELETE FROM orders;
    DELETE FROM orders_status_history;
    DELETE FROM orders_products_download;
    DELETE FROM orders_total;
    DELETE FROM orders_products;
    DELETE FROM orders_products_attributes

  3. #3
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: deleting all data

    limelites,
    That list will DEFINITELY cause you problems.

    You've forgotten the address-book, all the product-related tables, all the attribute-related tables, and you've listed several tables that don't exist in a clean ZC install.

    Also, TRUNCATE TABLE is better than DELETE FROM


    http://www.zen-cart.com/wiki/index.p...atabase_Schema
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: deleting all data

    Thanks Dr. Byte, I'll take a look at those now...

  5. #5

    Default Re: deleting all order data

    I am looking at selling shop and do not want to transfer over old order data - however want to transfer all products & customers. any way to do this?

    I have lots of orders so going through and using the "delete" order would be crazy. so i was trying to figure out just what happens when you click that "delete" button. Then rather then makiing it for just that order I could use * in the sql command.

    Help please.

 

 

Similar Threads

  1. v153 Deleting All Data in Cart?
    By msbfrnj in forum General Questions
    Replies: 6
    Last Post: 17 Oct 2014, 06:32 PM
  2. Deleting ALL sample data
    By pcaspian in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 28 Aug 2008, 03:06 PM
  3. Deleting all countries?
    By blueparukia in forum General Questions
    Replies: 9
    Last Post: 11 Aug 2007, 06:15 PM
  4. Deleting all Products
    By Greybeard in forum General Questions
    Replies: 1
    Last Post: 20 Mar 2007, 06:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg