X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Moving from username login to email login (https://forum.x-cart.com/showthread.php?t=57462)

Sherif Nassar 01-10-2011 02:27 PM

Moving from username login to email login
 
I am moving to 4.4.1 . In order to switch the system to e-mail login, xcart needs me to remove all duplicate accounts that are using the same email address. Any ideas on how to do it in a bulk form rather than doing it manually for hundreds of accounts?

pauldodman 01-11-2011 12:49 AM

Re: Moving from username login to email login
 
Maybe something like this would help:
http://www.devcha.com/2008/03/how-to-remove-duplicate-records-with.html

Or you could export to Excel and use that to remove duplicates, then import it back in.

Just back it up first!

Sherif Nassar 01-25-2011 05:22 PM

Re: Moving from username login to email login
 
The thing is that the customers data is stored in more than one table. It is not a direct delete from one table. Anyone figured a way to do it? My objective is to remove the duplicate profiles while leaving the most recently logged in

raveworx 02-04-2011 06:01 PM

Re: Moving from username login to email login
 
I'm thinking about the same thing too. I haven't done it myself, but here are a few of the tables that I think need to be updated if the userids change. I may have missed a couple. Here are my rough thoughts on the process.

Delete old accounts
===================
Table: xcart_customers

Delete any old duplicate accounts (or if you want to keep them around for archive purposes, put a counter on their e-mail address...i.e. fake@address.com_1,fake@address.com_2 so they're no longer duplicate)


Relink records to newest account
================================
xcart_orders

This action would move any previous orders into the new account, so that the full order history is maintained.


Delete records pointing to any old accounts
===========================================
xcart_newslist_subscription
xcart_change_password
xcart_old_passwords
xcart_address_book
xcart_stats_customers_products

You don't want duplicate primary address records, for example, so just throw away the records in these tables that are linked to the old user ids.


All times are GMT -8. The time now is 10:18 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.