Jump to content

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

Recommended Posts



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) {




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?



Edited by devzk (see edit history)

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

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