Zen Cart Logo
Forums / General Questions / Importing customer data from old site and password encryption

Importing customer data from old site and password encryption

Locked

Views: 11,042

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
24 Dec 2007, 1:57 PM
#1
rpguk avatar

rpguk

New Zenner

Join Date:
Feb 2007
Posts:
19
Plugin Contributions:
0

Importing customer data from old site and password encryption

Hello,

I am currently working on a zen-cart site which is to replace an older bespoke system by another developer.

I have a dump of the old data base from the site and have managed to manually import the customers details successfully.

The only exceotion is with passwords which were stored encrypted by the previous site. Obviously I
want to make the transition from old site to new site as seamless to the customers as possible so keeping the login details the same is very desirable.

At present the old email/password combo's don't work. If I could make sure that zen-cart is using the same encryption method as the old site would this solve my issue? If so how would I go about this? I understand that zen-cart uses MD5+salt, is there anyway to change this simply?

Worst case scenario I will just reset everyones password and email that out to them, of course this isn't ideal. Any other ideas?

Many thanks,

Richard

24 Dec 2007, 2:40 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Importing customer data from old site and password encryption

I suspect that trying to change the method used in Zen Cart would give you problems in the future, whereas whenever I have transferred carts into Zen Cart I have always managed to break the passwords (for those that didn't simply hold them in plain text!) from the data alone, and then use the Zen Cart password function to re-encrypt them as Zen Cart expects. If you actually know the encryption method used on the existing site. this may be even easier.

Though some encryption regimes are more difficult to crack than others and one of the reasons that I like Zen Cart is that the password is not susceptible to being cracked like this, which is why I recommend using the Zen Cart approach.

24 Dec 2007, 3:42 PM
#3
rpguk avatar

rpguk

New Zenner

Join Date:
Feb 2007
Posts:
19
Plugin Contributions:
0

Re: Importing customer data from old site and password encryption

Thanks. Part of the problem is the previous developer not being too helpful, the less I deal with them the better.

I notice that the encrypted passwords in the old site are in the format of a 33 alphanumeric character string while the zen cart ones are the same with the addition of a colon and then two characters (i.e :ab)

Looking through the password_funcs.php file it seems that the colon is just a split point and the two additional characters are the 'salt'. Would removing this part help at all?

16 Jan 2008, 12:16 PM
#4
rpguk avatar

rpguk

New Zenner

Join Date:
Feb 2007
Posts:
19
Plugin Contributions:
0

Re: Importing customer data from old site and password encryption

I've had it confirmed that the passwords are hashed with MD5. Any further ideas?

6 May 2008, 5:21 PM
#5
david_paul avatar

david_paul

New Zenner

Join Date:
Nov 2007
Posts:
5
Plugin Contributions:
0

Re: Importing customer data from old site and password encryption

I have a matter a step removed.
I'm importing from a database where there was NO encryption of the password, so I need to encrypt them for Zen Cart. Considering there are over 2000 customers, I'd like to have some sort of automated method.
How do you proceed with that?

26 Aug 2009, 9:13 PM
#7
margecc avatar

margecc

Zen Follower

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
234
Plugin Contributions:
0

Re: Importing customer data from old site and password encryption

I just have a few questions about importing customers that I am trying to get through:

I am trying to add one customer as a test, before doing the full 2000 <insert pat on back here for being smart>

I have inserted the customer into:
customers
customers_info
address_book

When I go into admin and do a search I find the customer, however the date is screwy and when I hit "Edit" none of the information is there. Also this error is above it:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/actforms/public_html/cart/admin/customers.php on line 1035

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/actforms/public_html/cart/admin/customers.php on line 1037

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/actforms/public_html/cart/admin/includes/classes/object_info.php on line 29

Warning: Variable passed to each() is not an array or object in /home/actforms/public_html/cart/admin/includes/classes/object_info.php on line 30

Did I miss a table?

Also, do I need to encrypt the password, I would just like to put a generic one and let the customer choose their own.

Thanks for any help or input!!

26 Aug 2009, 10:46 PM
#8
margecc avatar

margecc

Zen Follower

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
234
Plugin Contributions:
0

Re: Importing customer data from old site and password encryption

margecc:

I just have a few questions about importing customers that I am trying to get through:

I am trying to add one customer as a test, before doing the full 2000 <insert pat on back here for being smart>

I have inserted the customer into:
customers
customers_info
address_book

When I go into admin and do a search I find the customer, however the date is screwy and when I hit "Edit" none of the information is there. Also this error is above it:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/actforms/public_html/cart/admin/customers.php on line 1035

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/actforms/public_html/cart/admin/customers.php on line 1037

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/actforms/public_html/cart/admin/includes/classes/object_info.php on line 29

Warning: Variable passed to each() is not an array or object in /home/actforms/public_html/cart/admin/includes/classes/object_info.php on line 30

Did I miss a table?

Also, do I need to encrypt the password, I would just like to put a generic one and let the customer choose their own.

Thanks for any help or input!!

Ok I figured it out. Completely stupid error on my part. Sorry for the bother.

:blush:

7 Oct 2009, 3:42 PM
#9
jdw1979 avatar

jdw1979

Zen Follower

Join Date:
Jun 2009
Location:
NC
Posts:
174
Plugin Contributions:
0

Re: Importing customer data from old site and password encryption

So, um, I'm kinda embarassed to be asking this, especially considering you're referring to whatever I've got going on as a "completely stupid error," but...exactly how did you sort it? I'm getting the same error messages that you got after importing a customers.csv into phpMyAdmin.

7 Oct 2009, 4:02 PM
#10
margecc avatar

margecc

Zen Follower

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
234
Plugin Contributions:
0

Re: Importing customer data from old site and password encryption

LOL, it was an easy fix so I felt kinda silly after wards.

It's from your customer.csv file not matching your address_book.csv file not matching your customers_info.csv file. What created this was when I imported the file, the header row on the customers.csv file and the address_book.csv is automatically given a ID numbers by the tables, which was putting all my ID numbers off by one.

How I fixed it (its much easier than the description sounds). I opened all three files in excel. I went into zen, created a fake customer. I went into the tables and checked on the customer table and address table and noted the respective ID numbers. Go into excel, and start your id number at +1. So if your created customer has an ID number of 100, then the first customer in my csv file was assigned the number of 102 cause the header row would automatically be assigned the number of 101 by the table. Same applies in the address_book table. If the address_book_id for the fake customer was 150, then my .csv file would start at 152. Also make sure that the customers_default_address_id numbers in the customer.csv file matches the assigned address_book_id in the address_book table. The customer_info table is very straight forward. Once you've uploaded all files, you need to go to the table and delete the header rows, or when you go to do it again, it will give you duplicate errors.

Hope that makes sense. I hate partial explanations of things, but perhaps I over complicate things by full explanations. If you keep having problems fire me off a PM and I'll give you a hand.

7 Oct 2009, 4:16 PM
#11
jdw1979 avatar

jdw1979

Zen Follower

Join Date:
Jun 2009
Location:
NC
Posts:
174
Plugin Contributions:
0

Re: Importing customer data from old site and password encryption

Sweet, thanks. I'll let you know how it goes.