Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2005
    Location
    London, UK
    Posts
    144
    Plugin Contributions
    0

    Default need to delete all customers

    I have just setup a new zencart using a copy of my prviosu database.

    Now I need to delete all the customers. There are something like 1300 customers in there so I don't want to have to delete them one by one! What is an easy way to delete all the customers in one go ?

    Thanks,
    Sheryl

  2. #2
    Join Date
    Apr 2005
    Location
    ATX
    Posts
    111
    Plugin Contributions
    0

    Default Re: need to delete all customers

    Quote Originally Posted by trillian View Post
    Now I need to delete all the customers. There are something like 1300 customers in there so I don't want to have to delete them one by one! What is an easy way to delete all the customers in one go ?
    Probably the quickest way to do so would be to open the db using phpMyAdmin and emptying everything from all the customers tables. Open the table, and you'll find a big red EMPTY tab at the upper right. Don't use DROP, or you'll have to add the table back in. Probably all the orders tables too.

    Next time, you should probably just use a copy of the database structure from the old site using the Export function, and build the new one by running the SQL statements it generates, MINUS the customer- and order-specific inserts.

    All this assumes you're using MySQL.

  3. #3
    Join Date
    Jun 2005
    Location
    London, UK
    Posts
    144
    Plugin Contributions
    0

    Default Re: need to delete all customers

    Thanks Bill !

    That's excellent. The only other thing I'd like to get rid of is the reports, which still show products viewed and products purchased.

    I do not see anything obvious in the database where these are stored. Is it in 'Activity Log' ?

    -S

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: need to delete all customers

    For customer data, you need to be sure you purge all data related to customers. If you only emptied the "customers" table, you'll have big problems later.
    You need to deal with the "customers_info" and "address_book" tables similarly.

    As to resetting stats, there are some options to do that in Admin->Tools->Store Manager


    For other database-related info, peek at the schema here:
    http://www.zen-cart.com/wiki/index.p...rdered_by_Data
    .

    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.

  5. #5
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: need to delete all customers

    Couldn't help myself over hearing there was no such functions integrated in the admin's customers page. It's alright - I built my own.

    Here's the package if interested.

    -- Compatible with Zen-Cart 1.3x ---

    Good luck.

    *** attachment removed by request***

    Note: Do NOT post in this thread for questions about the Delete All Customers MOD. If you have questions, please create a new topic and we'll remain there so that the topic we're currently on would not be considered off topic.

    Let's give a chance to our DEV team.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: need to delete all customers

    Quote Originally Posted by TheOracle View Post
    Couldn't help myself over hearing there was no such functions integrated in the admin's customers page. It's alright - I built my own.

    Here's the package if interested.

    -- Compatible with Zen-Cart 1.3x ---

    Good luck.
    Good grief. That code will purge customers, orders, cc transaction records, coupons, emails, paypal transaction history, reviews, and more. It also purges two critical system tables that should never be touched.
    *** USE AT OWN RISK ***
    Also, I disagree with any suggestion that putting a link to such a destructive tool (with or without errors) on any regular admin page such as the "customers" page. That should be tucked away more discreetly in another location or never displayed at all.
    .

    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.

  7. #7
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: need to delete all customers

    This is already mentionned in the installation inside the ZIP file. I don't like it either personally but I thought this was the point of this topic. If I was wrong about it, then - yes - perhaps removing it would be the best suggestion since it is not the most secured way for webmasters to consider by deleting all customers (even though by phpmyadmin).

    In addition, since I can't modify my post - I cannot remove this attachment. If one of the DEV team could do it, I guess it would be for the best.

  8. #8
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: need to delete all customers

    There, now it has been removed.

 

 

Similar Threads

  1. Reset store: Delete all orders, customers, etc.
    By flix in forum Managing Customers and Orders
    Replies: 16
    Last Post: 31 Oct 2012, 08:04 PM
  2. 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
  3. Can i delete all my customers?
    By touchclothing in forum General Questions
    Replies: 9
    Last Post: 29 Oct 2009, 06:11 AM
  4. Delete all customers
    By panzico in forum General Questions
    Replies: 1
    Last Post: 14 May 2009, 06:29 PM
  5. 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

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