Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    279
    Plugin Contributions
    0

    Default Need help importing customers database from csv file into mySQL

    Hi gang,

    I'm just about ready to launch my new Zen Cart website and I exported all my customer's names, addresses, passwords and email addresses from my old website and Filemaker database. I've cleaned it up so only one of each email address is now in there and it's the latest one they placed on my old site. (sometimes they type it 2-3-4 times...duh)

    I looked at the mySQL database and I see the tables
    CUSTOMERS
    and ADDRESS_BOOK (or similar name...too early for me this morning)


    In the CUSTOMERS table, there is only a place for the name and email from my list and in the ADDRESS_BOOK I have all all the other stuff.

    If I create a customer ID field in my exported (cleaned up) database, will this make it import correctly into mySQL and keep together?
    Also, am I to assume that I CANNOT import the passwords they made in the older website? I have 3 customers in my new Zen Cart website now and when I view the password field in mySQL, they are all encripted.
    If I try to import my list of old ones, will they even work?? Or (as stated in another post) will the returning customer(who will first hear about the new website from a bulk email) have to create a new password??


    Here are the fields in my database that I would like to enter into the 2 tables of mySQL
    I have almost 20,000 customers to import BTW.

    eShopper_Email
    Password
    BillNameFirst
    BillNameLast
    BillCompany
    BillAddress1
    BillAddress2
    BillCity
    BillState
    BillZip
    BillPhoneDay
    BillPhoneEve

    I'll have to create that Customer ID field and populate it with a number before I import into Zen Cart... (I presume, so it has the same Customer ID in both the Customer and Address Book tables.... right?)


    I also have 'ShipTo' fields, but I'll just leave them out instead to make it easier.


    Any help or direction on the proper method of doing this will be greatly appreciated.

    thanks,
    Jeff Michaels
    pres of Musical Creations Ltd.

  2. #2
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Need help importing customers database from csv file into mySQL

    I would suggest you either pay someone to import your db or try using Easy Populate, available in the Downloads section -- I think. If not available a search of the Forums should find more info for you.

  3. #3
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    279
    Plugin Contributions
    0

    Default Re: Need help importing customers database from csv file into mySQL

    I looked at Easy Populate just now and there is not import function for customers or address books.

    I may try to get up the guts and try to import as I mentioned above by creating a customer ID in my database first.
    Heck, I imported 23,000 items and 225,000 attributes for them the same way...raw mySQL importing and it works if you watch where you are at all times.

    wish me luck!

    Jeff

  4. #4
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Need help importing customers database from csv file into mySQL

    Good Luck!

    You may find that after you get things the way you want, Easy Populate is the way to go. Being able to have everything in a Spreadsheet, for changing/adding mulitple new items, is definitely the way to go.

  5. #5
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    279
    Plugin Contributions
    0

    Default Re: Need help importing customers database from csv file into mySQL

    there's just no import/export for customers in it...


    Jeff

  6. #6
    Join Date
    Mar 2006
    Posts
    208
    Plugin Contributions
    0

    Default Re: Need help importing customers database from csv file into mySQL

    Jeff, don't panic
    Take your time and download the customer related fields from ZC as csv files to your local place.
    Open them, see what they contain.

    After that you will see that it is a piece of cake to import thousands of them by assigning zen's table headers to your excel (or csv) index headers and to load the converted csv into your database.
    Then check how zc handles the password encryption, might be that yours will be valid as well.

    Make one customer import to check if it works.

  7. #7
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    279
    Plugin Contributions
    0

    Default Re: Need help importing customers database from csv file into mySQL

    I uploaded it all a few moments ago, but the password encription doesn't work.
    It just loads it what the passwords actually were, unencripted.


    Unless you know of another way to keep those old passwords, I'll have to email everyone to log on have one sent to them and then they can change it if they want

    thanks,
    Jeff

  8. #8
    Join Date
    Jan 2004
    Posts
    66,378
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Need help importing customers database from csv file into mySQL

    You will want to also insert matching records to the customers_info table, or else you'll encounter database errors during login.

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

    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.

  9. #9
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    279
    Plugin Contributions
    0

    Default Re: Need help importing customers database from csv file into mySQL

    Thanks DrByte,

    I will do that right now....
    But do you know how to get around the customer password encryption so I can import they're actual 'old' passwords and it will allow them entry, without having to make a new one?

    thanks
    Jeff

  10. #10
    Join Date
    Jan 2004
    Posts
    66,378
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Need help importing customers database from csv file into mySQL

    You'd have to write a PHP script to read the old password, encrypt it, and write it to the database. You could use the zen_encrypt_password() function within Zen Cart to do the encryption.
    .

    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. Importing Customers into ZC from Another Database
    By clausont in forum Managing Customers and Orders
    Replies: 2
    Last Post: 22 Dec 2012, 10:21 PM
  2. Dreaded mYSQL 1064 error when importing MySQL 4 database into MySQL5
    By dml311071 in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 10 Jun 2008, 05:38 AM
  3. problems importing to mysql from .csv - products not showing
    By TXMagnum in forum General Questions
    Replies: 1
    Last Post: 29 Jan 2008, 05:23 PM
  4. Importing Customers from CSV
    By atracksler in forum Managing Customers and Orders
    Replies: 2
    Last Post: 15 Apr 2007, 02:05 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