Inform-All Posted June 2, 2017 Share Posted June 2, 2017 Hello, I want to send an email to an employee if a order status is changed to a (custom) status. This is what i tried: public function install($delete_params = true) { if (!parent::install() || !$this->registerHook('actionOrderStatusPostUpdate')) return false; return true; } /** * * @param array $params Hook params. */ public function hookActionOrderStatusPostUpdate($params) { //SEND THE MAIL } So i have been trying, but so far it seems that "ActionOrderStatusPostUpdate" is not being triggered. Any ideas? (and a good solution to the proper mailing method)? Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted June 3, 2017 Share Posted June 3, 2017 Hi..i have used this its working form me public function install() { return parent::install() && $this->registerHook('actionOrderStatusUpdate'); } public function hookActionOrderStatusUpdate($params) { $orderstates = $params['newOrderStatus']; if($orderstates->id == "id"){ //email code } } Thanks 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