Blawdi Posted March 18, 2019 Share Posted March 18, 2019 Hello, I need to change group for all customer with mail exemple : @prestashop.com Could you enlighten me on the request? Thx Link to comment Share on other sites More sharing options...
MigrationPro Posted March 18, 2019 Share Posted March 18, 2019 Hello Blawdi, Using this query you can change the group of all customers with ending: @prestashop.com UPDATE ps_customer_group as cg INNER JOIN ps_customer as c ON cg.id_customer = c.id_customer SET cg.id_group = 1 where c.email LIKE "%@prestashop.com" change the "ps_" with your table prefix and cg.id_group = 1 also can add your group ID which you want to assign to the customer. 1 1 Link to comment Share on other sites More sharing options...
Blawdi Posted March 18, 2019 Author Share Posted March 18, 2019 Hello, Thanks u! I try it tonight Link to comment Share on other sites More sharing options...
MigrationPro Posted March 18, 2019 Share Posted March 18, 2019 You are most welcome! Link to comment Share on other sites More sharing options...
Blawdi Posted March 18, 2019 Author Share Posted March 18, 2019 It is possible to use this command only for Group 3 emails (client) so that emails @ prestashop.com in the other groups are not changed. thanks a lot for your help Link to comment Share on other sites More sharing options...
MigrationPro Posted March 19, 2019 Share Posted March 19, 2019 Hello, Use this query: UPDATE ps_customer_group as cg INNER JOIN ps_customer as c ON cg.id_customer = c.id_customer SET cg.id_group = 1 where c.email LIKE "%@prestashop.com" AND c.id_default_group = 3 in this time will updated ID group 3 and "prestashop.com" 1 2 Link to comment Share on other sites More sharing options...
Blawdi Posted March 21, 2019 Author Share Posted March 21, 2019 Heyy !! Thanks you!!! The host does not accept Phpmyadmin events. Could you tell me how to create a php file to execute this command? I hope not to overuse your kindness. 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