Jump to content

Email to customer on manual activation (backend 1.7.x)


Recommended Posts

Hello to all,
I am at my first message and also at my first experiences with Prestashop.

I'm using version 1.7 and I've already done some customizations (I did my best!).

Now, I would like to send an email to the customer to advise that his account has been activated.
I must therefore intercept when the administrator clicks on the "X" in the customer backend list.

I have already found several (old) discussions about this and I have already seen the files that should go into this process.
I know that I have to copy an email template and I know how Prestashop uses to send, but this time I can not figure out how to hook this part to the action of the admin.

Can someone give me directions and suggestions?

Thanks in advance

PS: I prefer not to use a module already made for this

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

Hi to all,

this can be marked as resolved.

I'm not a programmer but I want to share what I did with you.

I have two user groups: private and company.
Privates can register at the store without problems while companies are under approval.

So, first of all, when the user chooses the group in the form I set a cookie (I add it to the Prestashop cookies), then in a module, I use hookCreateAccount to update their default group and the groups array.

Next, with another module and the actionObjectCustomerUpdateAfter and actionObjectCustomerUpdateBefore checking the status update from the customer card in the backend, if it changes and becomes 1 then I send the email to the user confirming the approval.

Well, maybe there are better ways to do this but it can be a solution.

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