Jump to content

Solved. Which customers have an account - how to configure sql query?


vampira

Recommended Posts

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

  • vampira changed the title to Solved. Which customers have an account - how to configure sql query?

"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).

quickupdate_update_update_customer_groups.thumb.gif.a5714961400dee7639c36410d5e58de5.gif

Edited by QuickUpdate.net (see edit history)
Link to comment
Share on other sites

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 by vampira
added info (see edit history)
Link to comment
Share on other sites

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 by QuickUpdate.net (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...