Jump to content

Group change alert by email


Recommended Posts

I want to send an email to the client to change group when your account , you get an email has changed as the client group guest_to_customer .. something like .. but instead of client account has invited serious group ... for example a distributor customer group .. .

Somehow there has to be .. a modification in php or something ?

Thanks, I have Prestashop 1.6

Link to comment
Share on other sites

I'm having a really hard time figuring out what you mean, could you clarify the "serious" part?
It seems you want to send out an email what a customer is put in a group, but only a specific one you choose? Is that what you need?

Link to comment
Share on other sites

The default group is Customer ho ... and I set it to a new Distributors , so , qeu when I enter his client card backoffice and change of group , you get an email as such has changed group to another ..

Something like when changing customer account guest account ( guest_to_customer ) .

For the same but with changing group.

 

(Sorry for my english, i from spain)

Thank you for answering Nemo

Edited by SergioE (see edit history)
Link to comment
Share on other sites

  • 1 month later...
  • 5 weeks later...

i'm working with PS 1.6 and i would also like to know how to do it...

 

Don't know if Nemo 1 understood, so i'll try to explain it (at least from what i understood and need)

 

A client make a new registration, they go to client group.

If i want to change them to a new group, and want the client to know about this, i need to send an email by hand.

 

So how can we send an email automatically every time we change a client from one group to another, or just add the client to a new group?

 

Thank you

Link to comment
Share on other sites

Ok, I got it now.

It might be more complicated than you might think.

What I would do, is modify this method of the product class

 

public function updateGroup($list)
{
if ($list && !empty($list))
{
$this->cleanGroups();
$this->addGroups($list);
}
else
$this->addGroups(array($this->id_default_group));
}
 
List refers to the new list. So, you need to first get the old one. Compare it with the new, get the ids of the difference groups. If there are, and they are the ones you want to send an email for, send that out
Link to comment
Share on other sites

Thanks, can you tell us what is the file we need to change?

 

And this way, every time we add a client to a new group, the client will get an automatic email to know it, correct?

And like this, were can we check the email content to change something if we need to?

 

 

Thank you

Link to comment
Share on other sites

The product class -> classes/product.php

Yes, that is correct. You will have to create the new email template of course, and if you place it inside the main mails folder you should also be able to manage that from your back office

Link to comment
Share on other sites

  • 4 weeks later...
  • 8 months later...

Hello,

 

Which method is needed to by modified or do I simply add the function to classes/product.php? Then, what is the email template to be modified? In the code there is no template name or function to send an email. Thanks in advance.

 

Prestashop Version 1.6.0.9

Link to comment
Share on other sites

×
×
  • Create New...