Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
daviswe
daviswe
I set up several user types, and decided to combine some of the types into just a generic 'EdSetsCustomer' type which is the "1" type.
 
After combining them, I found about 307 'abandoned' users and the cart would not let them order products or even log in since they had no type.
 
Here's what I did to fix my database, in case anyone is interested:
 
Go to your phpMyAdmin and open your viart database. Select the va_users table.
 
Run an UPDATE query similar to this:
 
UPDATE `va_users`
SET user_type_id=1
WHERE user_type_id IN (3,4,5,6,8,9,10,12);
 
This query puts the code "1" in the "user_type_id" (which is my 'EdSetsCustomer' type). Since I am using the numbers 2,7,and 11 for the three other customer types (dealer, group coordinator, and affiliate) you will note that those numbers don't appear in the list.
 
In simpler words, if you need to clean up your data after deleting some of your customer types, this is a very efficient way to have SQL go through the table data and fix what you want fixed by exchanging the numerical ID.
 
If you can't do it all in one SQL query, you can change the 'SET' clause and also change the WHERE clause as well.
 
Hope this helps anyone struggling with this.
 
Ed
 
dmOZ
dmOZ
Great tip.
be nice if the system warned you about users in those user-types and gave you an option to re-allocate