robson_alves Posted January 25, 2021 Share Posted January 25, 2021 Preciso de um Modulo ou uma função para colocar clientes em um determinado grupo diferente. O Grupo que criei é o CNPJ , preciso que cliente com cnpj já vai direto para esse grupo . o select dos grupos: SELECT b.*, a.* , (SELECT COUNT(jcg.`id_customer`) FROM `ps_customer_group` jcg LEFT JOIN `ps_customer` jc ON (jc.`id_customer` = jcg.`id_customer`) WHERE jc.`deleted` != 1 AND id_shop IN (1) AND jcg.`id_group` = a.`id_group`) AS nb FROM `ps_group` a LEFT JOIN `ps_group_lang` b ON (b.`id_group` = a.`id_group` AND b.`id_lang` = 1) WHERE 1 ORDER BY a.id_group ASC LIMIT 0, 50 a tabela com os cnpj : SELECT `id_djtalbrazilianregister``id_customer``cpf``cnpj``passport``rg``ie``comp`FROM `ps_djtalbrazilianregister` WHERE 1 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