Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Mar 2008
    Posts
    26
    Plugin Contributions
    0

    Default Remove Orders & Customer Info from DB

    Hi, just wondering if it's possible to run a script on the DB to remove customer info and order history info and anything else that's related? Basically I want to keep all products and configuration info there, but act as if the store is starting from Order #1 all over again.

    Cheers

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,701
    Plugin Contributions
    11

    Default Re: Remove Orders & Customer Info from DB

    Anythings possible but quite a few are never tried because it's easier to do it a different way. Necessity was NOT the mother of invention --- It was laziness!

    Unless you just have to divorce yourself from former customers, why bother? No one has to know but you.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  3. #3
    Join Date
    Mar 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: Remove Orders & Customer Info from DB

    Reason being I need to setup a clone site for the same customer where a majority of the products will be the same, but obviously purchase/customer history will need to be emptied.

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,701
    Plugin Contributions
    11

    Default Re: Remove Orders & Customer Info from DB

    Then you might want to set the new site up bare (in Texas we say nekkid) and use easy populate to take the products off the old and add them to the new.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  5. #5
    Join Date
    Mar 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: Remove Orders & Customer Info from DB

    Thanks for the tip, though I also want to move any configuration information across to the new site so initially seems easier to just remove the customer/purchase data, I just need to make sure that any other related data is also removed so as to not cause any breakages in data relationship. I haven't used the ZC DB that much so was hoping someone could easily tell me which tables I need to concentrate on, otherwise I'll have to go study it all for a while

    cheers

  6. #6
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Re: Remove Orders & Customer Info from DB

    I would have to agree with dbltoe. I see this question a lot of here, I just don't understand why people don't like to start fresh. Or just Copy the site over and don't worry about customers info. What are the odds that same email would be used again on the new site. But again it happens to me a lot on my smaller sites.

    I have a lot of small niche sites that have the same products as the main site. Thank GOD to EP. it's a matter of export and edit then import into the new site. Don't have to worry about customer information or anything else.

    You can edit the customer related information easily in myphpadmin but again if you knew how to do it you wouldn't ask in here, which leads me to say, don't attempt to do it in phpamdin.

  7. #7
    Join Date
    Mar 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: Remove Orders & Customer Info from DB

    Copying over the site is no problem, but having old info interferes with stats etc of total sales, # of customers, newsletter mailouts and what not.

    Im comfortable with t-sql so don't have an issue clearing info out, I just don't have a huge amount of experience with this database so don't know off the top of my head what's related.

  8. #8
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Re: Remove Orders & Customer Info from DB

    Then Easy Populate is the best solution.
    Why would you want to have a duplicate site anyway. That will hurt SER and SEO. I only do it to create niche sites and test different ideas before implementing them into the large site.

  9. #9
    Join Date
    Mar 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: Remove Orders & Customer Info from DB

    But from what it seems, EP will only do the products, whereas I want all configuration info stored in the DB also moved across.

    The customer wants a duplicate of the site with a different skin and no customer/purchase history. 90% of the products will remain the same. It's a bit more of a site targeted towards a niche market.

    So if EP is the best method I guess my process will be something like:

    - Setup new site
    - Copy across theme (to be re-skinned)
    - Duplicate all admin settings manually
    - Use EP to move across product data

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

    Default Re: Remove Orders & Customer Info from DB

    If ALL you want to remove is customers and orders, then you'll need to TRUNCATE the tables related to Customer Information and Order History:
    http://www.zen-cart.com/wiki/index.p...er_Information
    http://www.zen-cart.com/wiki/index.p...#Order_History

    If you've been receiving payments via PayPal, then I recommend also truncating the "paypal" and "paypal_payment_status_history" and "paypal_session" tables.
    .

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Suddenly getting FEC redirect loops; missing customer info from orders
    By irsarahbean in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 16 Jul 2013, 10:39 AM
  2. v151 Problem & solution to additional customer status emails without customer info
    By delia in forum Managing Customers and Orders
    Replies: 8
    Last Post: 11 Jul 2013, 02:12 AM
  3. REMOVE "more info" from Productlisting and reduce space between price & drescription
    By hooai12 in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 4 Jun 2010, 05:25 PM
  4. Customer getting orders from another customer
    By Diego Vieira in forum General Questions
    Replies: 0
    Last Post: 24 Jun 2009, 11:44 PM
  5. Remove In stock Qty and Manufacturer info from Product info?
    By this side up in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Dec 2006, 07:59 AM

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