Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Where Does Vendor Invoice Order Notification Come From? Rate Topic   - - - - -

 

Posted 05 March 2014 - 10:21 PM #1

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

1) One to the customer w/ the invoice
1) 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?

 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1248 posts

Posted 02 April 2014 - 04:55 AM #2

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

#php - search for the Mailer::sendMail
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
part of hungryweb.net

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19483 posts

Posted 02 April 2014 - 09:44 AM #3

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

1) One to the customer w/ the invoice
1) 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?


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.

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.