vampira Posted January 24 Share Posted January 24 (edited) How should I put together an SQL query if I want to know which customers have an account? I'm not interested in which group the customer is in, but I need the info if they have a customer account or not. Edited January 25 by vampira solved (see edit history) Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted January 24 Share Posted January 24 (edited) By how you formulated you are looking for some solution of tracking visitors Edited January 25 by QuickUpdate.net (see edit history) Link to comment Share on other sites More sharing options...
vampira Posted January 25 Author Share Posted January 25 I do not want to track the visitors but want to filter out the customers who have created an account. Background: Due to a f***-up the default Customer Grouping had been incorrectly set up. And because of that, the registered customers did not end up in the Customer group, but as Guests/Visitors. As I have now applied a discount % for the Customer Group, the persons who have an account should receive an automatic price drop, but as the system has assigned them to the wrong group, the discount is not applied. So I'm looking for a SQL query, with which I can get the full list of registered account owners, so I can correct the issue. I know that I can go through all the customer profiles one by one, but I was hoping that I can at least get the necessary information with less labour. I'm aware that the group assignment correction will most likely have to be done manually. Link to comment Share on other sites More sharing options...
vampira Posted January 25 Author Share Posted January 25 Found an answer myself. The table is ps_customer and the field I was looking for is is_guest. Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted January 25 Share Posted January 25 (edited) "Found an answer myself. The table is ps_customer and the field I was looking for is is_guest." - didn't understand your specific use case initially because those are also "accounts" but guest ones. "I'm aware that the group assignment correction will most likely have to be done manually." - If you are not good with SQL, can be done from an interface with a mass update module like QuickUpdate (example below). Edited January 25 by QuickUpdate.net (see edit history) Link to comment Share on other sites More sharing options...
vampira Posted January 25 Author Share Posted January 25 (edited) Thank you for the reply! I know that your interest is that I'll buy the module , but would the SQL query: UPDATE ps_customer SET id_default_group = '3' WHERE is_guest =0; be correct, if the aim is to get all the customer accounts, who are not guests, into the Customer Group 3? Edit: Or there should probably be another field, as manually I do change two fields: Group Access and Default customer group... Edited January 25 by vampira added info (see edit history) Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted January 25 Share Posted January 25 (edited) That query is ok if you only want to update the default group, not for for reassigning other groups for the respective customer accounts. Also not everyone searching for a solution to the same problem as yours want to waste the time to learn SQL and might prefer a ready made alternative / GUI interface. Edited January 26 by QuickUpdate.net (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now