Jump to content
devzk

Module mailalerts send mail to merchant/admin even if order status is "error on payment" PS 1.6.1.1

Recommended Posts

Hello,

 

I'm having an issue with the mailalerts module.

 

I have a order state (ID: 8) indicating "error on payment". In BO, the state has checked the option: "Send email to customer when an order change to this state".

 

Then I have a payment module (realexredirect - addon payments). Everytime a customer fails on its payment, mailalerts sends 2 emails. One for the customer (this one is fine) and another to the admin, saying "New order, but with an error message".

 

I'm trying to avoid the second email. I searched inside module (mailalerts) and it has 2 hook functions that could be sending the second email ( in fact they do call Mail::send() ):

 

- hookActionValidateOrder($params)

- hookActionOrderReturn($params)

 

In both I added:

 

if($order->current_state == 8) {

  return;

}

 

But the module is still sending the second email.

I searched for any reference of "Mail::class" or "Mail::send function" but it is not in there. (inside the payment module)

 

What else could it be?

 

Thanks!

Edited by devzk (see edit history)

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More