Hi all,
I was confronted with this problem when a client who owns a wholesale business wanted to have all of his clients in ZenCart. He would then do a mailout to notify the clients that they can log in and place orders.
Problem:
1. What tables get updated when a client is added through ZenCart's interface?
2. What email address and password should I give the clients I have just added?
Resolution:
1. The tables are:
<header>_address_book - contain the customers' company names, contact names and addresses.<header>_customers - contain the customers' contact name, email and various other ZenCart parameters (group pricing, referral, etc.)<header>_customers_info - contain some (all?) of the customers' online activity logs.
Using phpMyAdmin I obtained the structures of the above files. I then reformatted the existing customer list I had to eventually end up with three matching comma-separated data files. I also created a unique ID for each customer. This is probably the most intricate part of the work as you must know something of data structure, and how to work with phpMyAdmin (which is by the way an excellent tool.)
Note: the unique ID MUST be unique. Make sure you do not use any already used by ZenCart.
Note: <header>_ corresponds to the header you have specified for your ZenCart tables at installation.
2. Email address and password
None of the clients I had to upload had an email address (for whatever reason) so I had to create a UNIQUE one for each client. And of course I also had to create a password.
Keeping it simple I chose the following format for the email address:
<customer_id>@<blah.com>
where <customer_id> is the unique record ID and <blah.com> is some arbitrary domain structure. The whole thing looks enough like a genuine email address to ensure ZenCart is happy with it when the client logs in.
The password is identical for all clients and it is the encrypted value of an arbitrary word such as: 62c4de849c1af31f90fe125527dd84dd:e3 for the word welcome.
Next step:
BACK-UP your existing data! BACK-UP your existing data! BACK-UP your existing data!
And then simply import the three files into ZenCart, again I used phpMyAdmin to do this.
Check the data has imported properly: count the rows, look at the data, etc
Test thoroughly: login as a client, try changing the password, etc.
Here you go.
Happy zenning!
Pierrick





