Jump to content

Mail employee on status


Recommended Posts

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

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

  • Like 1
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...