Hello.
How would I go about modifying OpenCart 3 so that email notifications go out to the admin whenever a customer edits their account information? (email, phone number etc) It doesn't need to go the customer; just to the admin.
This would operate much the same as email notifications for account register. Presumably I should copy the way register handles this. I have figured out that the code that sends out email upon account register is the alert function in catalog/controller/mail/register.php. But where is the code that calls this?
It is triggered with an event:
Trigger
catalog/model/account/customer/addCustomer/after
Action
mail/register/alert
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
The after refers to being after the ::addCustomer function has run as opposed to being a function called after.
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
Yeah... I wasn't able to figure out how to make that work. I created a new file, controller/mail/edit.php, with an alert function patterned like the one in controller/mail/register.php along with necessary language files and view. But the alert wasn't getting called.
In the end I resolved this by just putting all the mail code in the editCustomer function of controller/event/activity.php. It's not the proper way to do it but I don't really have more time to be working on this problem.
In the end I resolved this by just putting all the mail code in the editCustomer function of controller/event/activity.php. It's not the proper way to do it but I don't really have more time to be working on this problem.
Who is online
Users browsing this forum: Bing [Bot] and 414 guests