Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Aug 2008
    Posts
    63
    Plugin Contributions
    0

    Default Re: Reset store: Delete all orders, customers, etc.

    ok, but what exactly would i need to do with this code?

  2. #12
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,541
    Plugin Contributions
    19

    Default Re: Reset store: Delete all orders, customers, etc.

    Make sure you backup your database first.

    After the backup, you can run this from admin->Tools->Install SQL Patches.

    Use at your own risk!!!

  3. #13
    Join Date
    Aug 2008
    Posts
    63
    Plugin Contributions
    0

    Default Re: Reset store: Delete all orders, customers, etc.

    i tried running the script but i get this error:

    1146 Table 'tax1111403152225.zen_zc_address_book' doesn't exist
    in:
    [DELETE FROM zen_zc_address_book;]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

  4. #14
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,541
    Plugin Contributions
    19

    Default Re: Reset store: Delete all orders, customers, etc.

    oh, sorry, wasn't looking at the statement...

    remove ALL zc_ from it so it goes like
    DELETE FROM address_book;
    etc

  5. #15
    Join Date
    Aug 2008
    Posts
    63
    Plugin Contributions
    0

    Default Re: Reset store: Delete all orders, customers, etc.

    it seems to have worked for me, thanks for the help!!

  6. #16
    Join Date
    Jun 2007
    Location
    Nashville, TN
    Posts
    32
    Plugin Contributions
    1

    Default Re: Reset store: Delete all orders, customers, etc.

    Quote Originally Posted by EastSideAngus View Post
    Hey, I was looking for some time on how to delete all the orders and customers from my installation of zencart, after no luck in finding it online, I just created an sql script to do this.

    This is pretty much it here, it's helped me. Hopefully it will help you.
    NOTE: this won't touch any of the products or artists, or admin accounts, etc...

    Just the Orders and Customers. And any session entries related to them.

    Use at your own risk, of course:

    Code:
    DELETE FROM zc_address_book;
    DELETE FROM zc_coupon_email_track;
    DELETE FROM zc_coupon_gv_customer;
    DELETE FROM zc_coupon_gv_queue;
    DELETE FROM zc_coupon_redeem_track;
    DELETE FROM zc_customers;
    DELETE FROM zc_customers_basket;
    DELETE FROM zc_customers_basket_attributes;
    DELETE FROM zc_customers_info;
    DELETE FROM zc_customers_wishlist;
    DELETE FROM zc_email_archive;
    DELETE FROM zc_files_uploaded;
    DELETE FROM zc_orders;
    DELETE FROM zc_orders_products;
    DELETE FROM zc_orders_products_attributes;
    DELETE FROM zc_orders_products_download;
    DELETE FROM zc_orders_status_history;
    DELETE FROM zc_orders_total;
    DELETE FROM zc_paypal;
    DELETE FROM zc_paypal_session;
    DELETE FROM zc_paypal_testing;
    DELETE FROM zc_reviews;
    DELETE FROM zc_reviews_description;
    DELETE FROM zc_sessions;
    DELETE FROM zc_whos_online;

    Runing v1.5 - Glad I made a backup copy, because after running this script, new orders placed are not showing up in the admin Orders area, and the customer's order history.

    If someone has found a script to safely delete all orders without corrupting the database, then Please Post it here.

    Thank you!


    It's a geek thing. If I had to explain it, you wouldn't understand.

  7. #17
    Join Date
    Jun 2007
    Location
    Nashville, TN
    Posts
    32
    Plugin Contributions
    1

    Default Re: Reset store: Delete all orders, customers, etc.

    Here's what happened...

    I had the orders_status table in the script... orders_status should NOT be deleted.

    I removed that one, and the script worked perfectly.
    See http://www.zen-cart.com/showthread.p...ounter-history


    It's a geek thing. If I had to explain it, you wouldn't understand.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v150 Remove ALL customers and ALL orders before a certain date and reset counter history.
    By hawkwynd in forum Managing Customers and Orders
    Replies: 4
    Last Post: 10 Dec 2013, 03:22 AM
  2. Set all Processing orders to Delivered? Or delete all orders?
    By Brian1234 in forum Managing Customers and Orders
    Replies: 11
    Last Post: 29 Jun 2011, 10:04 PM
  3. How to reset zen cart? ie: delete all customers etc?
    By poosk in forum General Questions
    Replies: 3
    Last Post: 18 Nov 2009, 04:12 PM
  4. All customers fields in ADMIN > CUSTOMERS are empty and I can't delete them!
    By plgaudreau in forum Managing Customers and Orders
    Replies: 1
    Last Post: 26 Feb 2008, 02:08 AM
  5. Delete or reset Pending Orders?
    By atomage in forum General Questions
    Replies: 1
    Last Post: 29 Nov 2006, 02:45 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR