Jump to content

Preciso de um Modulo ou uma função para colocar clientes em um determinado grupo diferente


Recommended Posts

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

 

 

 

cnpj grupo.png

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More