Copying In Another Email Address With Order Confirmations?

Hi,

So I managed this previously by modifying app/functions/Fn_cart.php where the following was found, but no more on the latest update?

//Notify customer

$toemail = $order_info['email'];

so where is this now taking place?

Thanks so much!

check $order_event array in the following schema

app/schemas/notifications/events.php

Have you found a solution to this?

the TO is in the events.php but how would you add a second email address to it?

I have an email address created in the customer profile (NEW FIELD) but when I add email2 to the 'to' line it never sends the second email

receivers' => [
UserTypes::CUSTOMER => [
MailTransport::getId() => MailMessageSchema::create([
'area' => SiteArea::STOREFRONT,
'from' => 'company_orders_department',
'to' => DataValue::create('order_info.email'),

'cc' => DataValue::create('order_info.email2'),
'template_code' => 'edp_access',
'legacy_template' => 'orders/edp_access.tpl',
'company_id' => DataValue::create('order_info.company_id'),
'storefront_id' => DataValue::create('order_info.storefront_id'),
'language_code' => DataValue::create('order_info.lang_code', CART_LANGUAGE)

This didn't work

anyone have any idea?

Did you try emails comma separated?

Did you try emails comma separated?

We had to create a send email field in the profile for the client to add a second email. Just need to send the order confirmation to the order_info.email as well as the users.email2 file.

I've tried just about everything to the events.php file to add the second email to the TO Line but nothing will work.

Any ideas?

'to' => DataValue::create('order_info.email'),

'to' => DataValue::create('order_info.email, users.email2'),
'to' => DataValue::create('order_info.email', 'users.email2'),

none of these will send the email to the second account. Admin gets the email the order Info email gets it but not the email2 account

any direction would be helpful in any way shape or form!

Thanks for your time.



Looks like users variable is not available here

Looks like users variable is not available here

what would an add-on cost to make it available here? this is a requirement of the client. The customer must add the boss's email address to the field for the purchase to be approved and po generated?

what would an add-on cost to make it available here? this is a requirement of the client. The customer must add the boss's email address to the field for the purchase to be approved and po generated?

Please leave a request on our website to get a quote. You can use link from my signature