Jump to content

[SOLVED] Send order notification made by a certain customer to a specific email address


5haun

Recommended Posts

Hi all

 

I want to modify the Mail Alerts module.

 

I get orders from a customer and I need the email notification for orders from that customer to go to a specific email address.

 

Is there some way where I could put an if statement in the module to do something like:

if {$id_customer == 3}

send email notification to [email protected]

else { send to the main email address set in the module.

 

I'm obviously not very PHP savvy but I know my way around.

 

Any help would to achieve this would be hugely appreciated!

Edited by 5haun (see edit history)
Link to comment
Share on other sites

Search for this code at about line 392 of modules/mailalerts/mailalerts.php:

$merchant_mails = explode(self::__MA_MAIL_DELIMITOR__, $this->merchant_mails);

Below that, you can add code like:

if ($customer->id == 3)
    $merchant_mails = array('[email protected]'); 

This should override the default merchant list for customer 3 only.

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