Where Does Vendor Invoice Order Notification Come From?

When a customer places an order, two emails are fired off…


  1. One to the customer w/ the invoice
  2. One to the vendor w/ the invoice



    Where does this email fire from? I understand the phpmailer.php class has the mail setup, and invoice.tpl has the invoice creation… but still not sure exactly where the email is being fired to the vendor with the order notification & invoice.



    Ideas?

Hi,

You can find bellow where(php) and what(tpl) is generated and send by email



#php - search for the [color=#ff0000]Mailer::sendMail[/color]

app/functions/fn.companies.php

app/functions/fn.cart.php



#tpl

design/backend/mail/templates/orders/

design/backend/mail/templates/companies/

design/themes/basic/mail/templates/orders/





I hope that helps,





Valentin

[color=#808080][size=2]part of hungryweb.net[/size][/color]

[quote name='husseinsharif' timestamp='1394058111' post='178828']

When a customer places an order, two emails are fired off…


  1. One to the customer w/ the invoice
  2. One to the vendor w/ the invoice



    Where does this email fire from? I understand the phpmailer.php class has the mail setup, and invoice.tpl has the invoice creation… but still not sure exactly where the email is being fired to the vendor with the order notification & invoice.



    Ideas?

    [/quote]



    Open the “app/functions/fn.cart.php” file and find the “fn_order_notification” function. You will see the following part of code there:



if ($notify_vendor == true) {
if (fn_allowed_for('MULTIVENDOR') && !empty($order_info['company_id'])) {
$company_lang_code = fn_get_company_language($order_info['company_id']);
// Translate descriptions to admin language
fn_translate_products($order_info['products'], '', $company_lang_code, true);
Mailer::sendMail(array(
'to' => 'company_orders_department',
'from' => 'default_company_orders_department',
'reply_to' => $order_info['email'],
'data' => array(
'order_info' => $order_info,
'shipments' => $shipments,
'use_shipments' => $use_shipments,
'order_status' => fn_get_status_data($order_info['status'], STATUSES_ORDER, $order_info['order_id'], $company_lang_code),
'payment_method' => fn_get_payment_data($order_info['payment_method']['payment_id'], $order_info['order_id'], $company_lang_code),
'status_settings' => $status_settings,
'profile_fields' => fn_get_profile_fields('I', '', $company_lang_code),
'secondary_currency' => $secondary_currency
),
'tpl' => 'orders/order_notification.tpl',
'company_id' => $order_info['company_id'],
), 'A', $company_lang_code);
}
}




Hope I answered on your question.