Jump to content
soopathemes

Send order confirmation to admin

Recommended Posts

I would like to send the order confirmation email to two admin email addresses. We receive the new order email, but this doesn't show the product details correctly due to a module we have for a "cut to size service", but the order confirmation email does.

We've edited the paymentmodule.php file and added one email address and that works perfectly, but we can't seem to figure out how to get it to send to a second. Any help much appreciated!

if (Validate::isEmail($this->context->customer->email)) {
                            Mail::Send(
                                (int) $order->id_lang,
                                'order_conf',
                                Context::getContext()->getTranslator()->trans(
                                    'Order confirmation',
                                    array(),
                                    'Emails.Subject',
                                    $orderLanguage->locale
                                ),
                                $data,
                                $this->context->customer->email,
                                $this->context->customer->firstname . ' ' . $this->context->customer->lastname,
                                null,
                                null,
                                $file_attachement,
                                null, _PS_MAIL_DIR_, false, (int) $order->id_shop,
                                'd****@r******.co.uk'
     );
 }

Share this post


Link to post
Share on other sites

It looks like you are using the customer email as "to" parameter. You can just use an array, and an email will be sent to all of the addresses: ['one@me.com', 'two@me.com']

Share this post


Link to post
Share on other sites

So do I just replace this bit  'd****@r******.co.uk' with ['one@me.com', 'two@me.com'] ?

Do you know how we can add the customer message to this email? I've tried to follow some instructions I found on here and it just seems to add random messages to the email.

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.
Note: Your post will require moderator approval before it will be visible.

Guest
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