Zen Cart Logo
Forums / Managing Customers and Orders / Copying customer details from old site

Copying customer details from old site

Locked

Views: 3,172

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
25 Sep 2010, 11:10 AM
#1
totalsam avatar

totalsam

Zen Follower

Join Date:
Jan 2009
Posts:
126
Plugin Contributions:
0

Copying customer details from old site

Hello,

When I upgraded from 1.38 to 1.39 I decided it best to start a fresh and use it as an opportunity to remove alot of un needed mods etc.

I decided it easier to transfer all the old customer details over but not their order details. So manually copied information from the old database to the new.

Unfortunately now when returning customers access our system no addresses are stored unless they enter them.

(I have copied the address book over too) This means I am ending up with orders with blank names and addresses, and more importantly customers are being forced to re enter details or find their address in the address book!

Anyone know where I might have gone wrong?

Regards,
Sam

25 Sep 2010, 1:33 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Copying customer details from old site

Customer information is held in 3 tables:
customers
customers_info
address_book

27 Sep 2010, 2:59 PM
#3
totalsam avatar

totalsam

Zen Follower

Join Date:
Jan 2009
Posts:
126
Plugin Contributions:
0

Re: Copying customer details from old site

Hello,

I have looked into this and it seems I have added all this info.

Having looked a bit further the problem seems to be around the orders table in the database and not the customers.

Unless the customer edits the address the three address_format_id's seem to show "0", changing this to 6 means that the address is showing on the order now.

How do I make it put the correct address_format_id into the database automatically?

Kind Regards,
Sam

27 Sep 2010, 3:49 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Copying customer details from old site

The orders table is only used when on the Customers ... Orders ...

If you are having problems with the checkout or editing the Customers address information then there is a problem with their settings in the:
address_book

If you do not have the correct settings on the records for the:
address_book

for a customer, then there is a problem ...

The table:
customers

links to the table:
address_book

where the primary address is the:
customers_default_address_id

in the table:
customers

that matches to the:
address_book

with the fields:
address_book_id
customers_id

The other records in the:
address_book

for the matching:
customers_id

are the additional addresses for the customer ...

Where, specifically, are you getting errors on the Customer Addresses?

27 Sep 2010, 4:20 PM
#5
totalsam avatar

totalsam

Zen Follower

Join Date:
Jan 2009
Posts:
126
Plugin Contributions:
0

Re: Copying customer details from old site

Thanks for your time

Basically the address is not pulled up when people log in to their account, so when they make an order no addresses come up unless added again by the customer.

This then affects shipping calculations.

The address then doesn't show up in the admin>super orders screen (or edit orders or standard orders)

However on checking the orders table of the database the address is in all billing, shipping and customer address. The only problem being the address_format_id which is set to 0 as standard (changing it as stated makes the addresses become visable in the admin)

Any ideas where this might be?

Sam

27 Sep 2010, 4:24 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Copying customer details from old site

totalsam:

So manually copied information from the old database to the new.
totalsam:

Anyone know where I might have gone wrong?
You answered your own question.

This is why the upgrade instructions never advise doing such manual extraction of selective data. The upgrade process automatically retains all information intact when followed as instructed.

Something to consider next time. :blush:

27 Sep 2010, 4:31 PM
#7
totalsam avatar

totalsam

Zen Follower

Join Date:
Jan 2009
Posts:
126
Plugin Contributions:
0

Re: Copying customer details from old site

I wanted to start completely afresh with no additional database tables but wanted my customer data on the new store so old customers could still come back to me....

Don't believe there was any other way....

27 Sep 2010, 4:32 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Copying customer details from old site

You say you wanted to start fresh on your upgrade ... so does this mean that NONE of the database tables from v1.3.8 were used?

Then, you say that you wanted to maintain your existing Customer information so you imported your tables:
address_book
customers
customers_info

How did you import this information?

Do you still have a copy of your v1.3.8 database?

27 Sep 2010, 4:42 PM
#9
totalsam avatar

totalsam

Zen Follower

Join Date:
Jan 2009
Posts:
126
Plugin Contributions:
0

Re: Copying customer details from old site

I did not use any of the tables from 1.3.8.

I installed 1.3.9 and once I checked it was working I copied the data from the 1.3.8 customers, customers_info and address_book and put it into the new 1.3.9 store.

I used phpMyAdmin to do this. I also think I checked that the two tables were identical and they appeared to have the same headers.

I still have the database from 1.3.8 yes.

27 Sep 2010, 5:11 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Copying customer details from old site

Somewhere in copying the data from the database tables of v1.3.8 there is something not matching up ...

Without actually going through your database tables to see what is wrong, it is hard to guess where the specific problem is and the best way to fix this ...

You might try comparing those tables currently in v1.3.9 with the ones in v1.3.8 and see if they really match up ...

12 Oct 2010, 11:54 AM
#11
totalsam avatar

totalsam

Zen Follower

Join Date:
Jan 2009
Posts:
126
Plugin Contributions:
0

Re: Copying customer details from old site

Hello,

Sorry for such a delayed response.

All the data seems to link up. I have included an example customer (name and contact details edited for privacy) and the corresponding tables for this customer.

I can solve this manually for each customer by logging into their account and selecting one of their addresses as a primary address, however this doesn't appear to change anything in the database!

I did note that if I edited the orders table columns customers_address_format_id, delivery_address_format_id and billing_address_format_id that the orders side seemed to correct itself, I can't however find a similar table for the customer database so this can correct itself universally. I don't envy the task of editing all my customers info one at a time!!!!!

I look forward to your response.

Sam