Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2010
    Posts
    68
    Plugin Contributions
    0

    Default Import Customers From CSV Via MySql?

    Hi,

    I have a CSV of customers from our current non-online system with the usual e-mail, name, address, etc. I'd like to import these into Zen Cart 1.3.9f.

    I know how to import these directly into the db Zen_Customers using MySQL, but I don't know how to handle the Password column. Since the customers don't -have- a 'password', there's no reason why I couldn't use a dummy field if I knew what to use.
    1. Is it OK to import directly as I've described? If not, can you recommend how to do this?

    2. If it -is- OK to import, can I simply copy the same scrambled pw column from a known dummy customer or should I leave it blank... or null?

    3. Any other tips/traps to doing this?

    TIA,

    ---JC

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Import Customers From CSV Via MySql?

    TRAP:

    As each customer is assigned a customer ID which is an auto incremented value you will need to take care in doing this so that your ID's remain unique and not the value you currently have in your csv which may already belong to another customer

    It might be better to to install the news letter subscribe 3rd party module that only records as I recall the email address
    You could then email all these individuals as a reminder that their email address is in the DB and if they were to create an account using that email they only need to enter a password plus the other details

    Or if you have many, a better option is to start using one of the mass email services....one is mail chimp that is now allowing 2,000 addresses at no cost to you
    You then have access to professional looking email templates and you will also appear more professional
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Nov 2010
    Posts
    68
    Plugin Contributions
    0

    Default Re: Import Customers From CSV Via MySql?

    Thanks.

    Both are good suggestions!

    ---JC

    Quote Originally Posted by kobra View Post
    TRAP:

    As each customer is assigned a customer ID which is an auto incremented value you will need to take care in doing this so that your ID's remain unique and not the value you currently have in your csv which may already belong to another customer

    It might be better to to install the news letter subscribe 3rd party module that only records as I recall the email address
    You could then email all these individuals as a reminder that their email address is in the DB and if they were to create an account using that email they only need to enter a password plus the other details

    Or if you have many, a better option is to start using one of the mass email services....one is mail chimp that is now allowing 2,000 addresses at no cost to you
    You then have access to professional looking email templates and you will also appear more professional

  4. #4
    Join Date
    Nov 2010
    Posts
    68
    Plugin Contributions
    0

    Default Re: Import Customers From CSV Via MySql?

    I checked out MailChimp, but before I go down that road, are there any advantages to Newsletter Subscribe? It seems like I can get a pretty decent HTML newsletter (adequate for our purposes, in any case) in the built-in Zen Cart Newsletter Editor. I like the apparent integration between Newsletter Subscribe and Zen Cart.

    Just trying to decide before I spend a lot of time on either solution. It seems like either might be OK so I'm looking for more pluses/minuses.

    Thanks Again---This is -really- good!

    ---JC

  5. #5
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Import Customers From CSV Via MySql?

    1. The newsletter-subscribe addon is a BEAR to install, and touches TONS of core files, making upgrades a ROYAL PAIN IN THE REAR. I strongly recommend avoiding it unless you want lots of work later.
    Much better to use an external system if you've got a lot of addresses for non-customers. kobra has suggested one. There are others, such as those suggested on the Recommended Services link at the top of this page.

    2. If you do decide to import data blindly into your store (not recommended), keep the following in mind:
    a) DO NOT assign a password to those records. Better to leave them blank and have them use the Forgot My Password option to get a new one, otherwise you'll be giving everyone the SAME password, which is a huge security problem.
    b) You MUST NOT import only to the "customers" table. A customer record consists of data in three tables: customers, customers_info, address_book. If you don't enter in all of them, and if you don't cross-reference them to each other, then you'll end up with confused data, and lots of errors in your admin when accessing those records, and those customers will have difficulty using checkout. In short, it's not recommended to be blindly importing a CSV into the customers table. It's more complicated than that.
    .

    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.

  6. #6
    Join Date
    Nov 2010
    Posts
    68
    Plugin Contributions
    0

    Default Re: Import Customers From CSV Via MySql?

    Quote Originally Posted by DrByte View Post
    1. The newsletter-subscribe addon is a BEAR to install, and touches TONS of core files, making upgrades a ROYAL PAIN IN THE REAR. I strongly recommend avoiding it unless you want lots of work later.
    I was wondering about it for this reason alone. I come from a Drupal/Wordpress background and the thing that makes me cringe about platforms like ZenCart and PhpBB are how so many add-ons seem to be rely on doing 'mods' to core files.

    Quote Originally Posted by DrByte View Post
    2. If you do decide to import data blindly into your store (not recommended), keep the following in mind:
    a) DO NOT assign a password to those records. Better to leave them blank and have them use the Forgot My Password option to get a new one, otherwise you'll be giving everyone the SAME password, which is a huge security problem.
    b) You MUST NOT import only to the "customers" table. A customer record consists of data in three tables: customers, customers_info, address_book. If you don't enter in all of them, and if you don't cross-reference them to each other, then you'll end up with confused data, and lots of errors in your admin when accessing those records, and those customers will have difficulty using checkout. In short, it's not recommended to be blindly importing a CSV into the customers table. It's more complicated than that.
    Thanks. I had no intention of doing this blindly... which is why I asked first. And thank -you- for the quick and thorough reply.

    FOLLOW UP: Is there data model or other documentation on the zen cart db? I haven't seen any docs which describe this. Maybe I'm blind, but I think that would help me a lot.

    Again, THANKS!

    ---JC

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

    Default Re: Import Customers From CSV Via MySql?

    Quote Originally Posted by suntower View Post
    Is there data model or other documentation on the zen cart db? I haven't seen any docs which describe this. Maybe I'm blind, but I think that would help me a lot.

    Again, THANKS!
    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.

 

 

Similar Threads

  1. Import Users from CSV file
    By jupitergardens in forum Managing Customers and Orders
    Replies: 0
    Last Post: 10 Jul 2010, 08:10 AM
  2. How to import catergories from a csv ???
    By ---kate--- in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 15 Apr 2010, 09:53 PM
  3. Can I import from CSV?
    By jberry610 in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 5 Sep 2009, 06:16 AM
  4. Need help importing customers database from csv file into mySQL
    By jeffmic in forum Managing Customers and Orders
    Replies: 18
    Last Post: 20 Jan 2008, 04:54 PM

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