Imported Orders Assigned to Wrong Customer Accounts

I’m at the final stages of going live with my 3.0.5 store but have run into a problem.



A little history:



Installed CS-Cart 3 on my site in a subfolder a few weeks ago.

Used Store Import tool to import my 2.2.5 store.

In the meantime, built my 3.0.5 store and this morning I’m ready to move it to the root of my domain and take it live, moving my old 2.2.5 store into a subfolder called “old.”

I export all my orders and order items from my current 2.2.5 store into a CSV file.

I import the orders and order items into my 3.0.5 store.



Looking at my list of orders, I see the name Joe Bloggs, which is underlined and in blue, indicating Joe has created a user account. HOWEVER, clicking on Joe’s linked name does NOT take me to Joe’s account, it takes me to Betty’s account. Which means that Joe’s user account has no orders assigned to it, but Betty’s account has Joe’s order assigned to it.



It looks like it’s something to do with the ID that is assigned to users and somehow, anyone who has created an account since the store import and then their order imported today, has been assigned wrongly to orders.



This only affects a fairly small number of customers/orders because many do not create accounts when they order. However, for the those who have, it’s going to be confusing if they log in and find no orders. AND, it’s going to be more confusing when Betty logs into her account and finds Joe’s order details in HER order history.



How can I correct these assignments? Or should I just delete the affected user accounts and notify the users that their accounts have been deleted due to a technical problem and they will need to re-create them?



I looked in the CSV export from the 2.2.5 store to see if I could change the user IDs associated with these orders but apparently these are not exported, which may be the source of the problem.



Any help much appreciated.

I lodged a ticket with support this morning at 6:30 a.m. Must have been too late though. Oh well. So much for taking the site live today. :-)

Hi



I have had this problem twice and the reason is always the existing accounts in the newly cs-cart.



That is yours as admin and the test customer.



When you imported all users the took +2 user id because of the 2 existing users as said before.



You either have to change this manually in your db (like phpmyadmin) or reimport them after you change the ids of the 1 existing customers.



I know its very silly!!!



Fotis

Thanks Fotis. I had just figured this out during my lunch break. Back to work now, but when I get some time this evening I’m going to go into phpmyadmin and change out the user id’s. I was pretty sure that would fix it, but thank you very much for your input. It’s always good to know someone has been down this road before. :-)

Nice!!!



Its always nice to share solutions on problems, I found a lot of stuff in here this way!



Fotis

Hopefully this thread will help others in the future. :-)

Thanks for the post, I am doing exactly that this weekend. Fotis are you saying I should delete all my admin users before import, I thought they would just overwrite?



John

Hi John



I never take extreme mesures, I prefer to change the user id something bigger than the list.



But I think this is also a solution.



I for once would try this on a test installation first and see the results, as you might loose your admin credentials and entry to the admin.



MAybe first login and then via php admin deleting the existing users.

OK well I finally got this sorted. I had 9 customers with mismatched information. I just went through and assigned higher ID numbers temporarily to some customers while I gave other customers their proper ID. Now all the orders are assigned to the proper people.



Yay for me. :-)