Jump to content

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

Sender Name In Notification Email Rate Topic   - - - - -

 

Posted 14 December 2014 - 12:59 AM #1

Hi,

I have a query regarding multi vendor cs-cart v4.2.4. Whenever emails go to customer after he places the order he sees sender name to be the vendor who added the product. Here is what i would like to do.

I wish to create an id sales@mydomain.com with name as My Domain Sales. Whenever any email goes out to customer (Order Related). he should see the Sender Name as My Domain Sales. I am able to edit the order template files to change the subject and body of email but i have no clue how to change the sender name. Any help would be really appreciated.

Please see the image attached.

--Best

Attached Thumbnails

  • email.jpg


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

Posted 15 December 2014 - 09:24 AM #2

Good day,

Open the app/functions/fn.cart.php file and find the fn_order_notification function and replace:

// Notify customer
	    if ($notify_user == true) {
		    Mailer::sendMail(array(
			    'to' => $order_info['email'],
			    'from' => 'company_orders_department',
			    'data' => array(
				    'order_info' => $order_info,
				    'shipments' => $shipments,
				    'use_shipments' => $use_shipments,
				    'order_status' => $order_status,
				    'payment_method' => $payment_method,
				    'status_settings' => $status_settings,
				    'profile_fields' => $profile_fields,
				    'secondary_currency' => $secondary_currency,
				    'take_surcharge_from_vendor' => $take_surcharge_from_vendor
			    ),
			    'tpl' => 'orders/order_notification.tpl',
			    'company_id' => $order_info['company_id'],
		    ), 'C', $order_info['lang_code']);
		    if (!empty($edp_data)) {
			    Mailer::sendMail(array(
				    'to' => $order_info['email'],
				    'from' => 'company_orders_department',
				    'data' => array(
					    'order_info' => $order_info,
					    'edp_data' => $edp_data,
				    ),
				    'tpl' => 'orders/edp_access.tpl',
				    'company_id' => $order_info['company_id'],
			    ), 'C', $order_info['lang_code']);
		    }
	    }

with

// Notify customer
	    if ($notify_user == true) {
		    Mailer::sendMail(array(
			    'to' => $order_info['email'],
			    'from' => 'sales@mydomain.com',
			    'data' => array(
				    'order_info' => $order_info,
				    'shipments' => $shipments,
				    'use_shipments' => $use_shipments,
				    'order_status' => $order_status,
				    'payment_method' => $payment_method,
				    'status_settings' => $status_settings,
				    'profile_fields' => $profile_fields,
				    'secondary_currency' => $secondary_currency,
				    'take_surcharge_from_vendor' => $take_surcharge_from_vendor
			    ),
			    'tpl' => 'orders/order_notification.tpl',
			    'company_id' => $order_info['company_id'],
		    ), 'C', $order_info['lang_code']);
		    if (!empty($edp_data)) {
			    Mailer::sendMail(array(
				    'to' => $order_info['email'],
				    'from' => 'sales@mydomain.com',
				    'data' => array(
					    'order_info' => $order_info,
					    'edp_data' => $edp_data,
				    ),
				    'tpl' => 'orders/edp_access.tpl',
				    'company_id' => $order_info['company_id'],
			    ), 'C', $order_info['lang_code']);
		    }
	    }

where sales@mydomain.com is the required e-mail address
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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Alt-team
  • CS-Cart Developer
  • Authorized Reseller
  • Join Date: 18-Jan 11
  • 2825 posts

Posted 15 December 2014 - 12:59 PM #3

Hello,

The company name and the address are taken from the Setting-> Company.

Why haven't you changed the company name in the setings?
Settings ->Company->Company.

Also you may enter sales@mydomain.com in the Settings->Company-> Order department e-mail address.

Best regards, Alt-team.

ADD-ONS  Web development service  | CS-Cart dedicated developers

Buy MULTIVENDOR - USD 1250 (14% off)   Buy CS-CART LICENCE - USD 345 (13% off)

 Email - manager@alt-team.com | Skype - Altteam    


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

Posted 15 December 2014 - 03:27 PM #4

Hello,

The company name and the address are taken from the Setting-> Company.

Why haven't you changed the company name in the setings?
Settings ->Company->Company.

Also you may enter sales@mydomain.com in the Settings->Company-> Order department e-mail address.

Best regards, Alt-team.


I think, because it is replaced by the vendor e-mail in MVE
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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Alt-team
  • CS-Cart Developer
  • Authorized Reseller
  • Join Date: 18-Jan 11
  • 2825 posts

Posted 16 December 2014 - 10:59 AM #5

I think, because it is replaced by the vendor e-mail in MVE


Oh, sorry. Yes.

Using the code from eComLabs only email address were used.
And as we understood you also need to change the name.

Instead of eComLabs code you should use

// Notify customer
		    if ($notify_user == true) {
				    Mailer::sendMail(array(
						    'to' => $order_info['email'],
						    'from' => 'company_orders_department',
						    'data' => array(
								    'order_info' => $order_info,
								    'shipments' => $shipments,
								    'use_shipments' => $use_shipments,
								    'order_status' => $order_status,
								    'payment_method' => $payment_method,
								    'status_settings' => $status_settings,
								    'profile_fields' => $profile_fields,
								    'secondary_currency' => $secondary_currency,
								    'take_surcharge_from_vendor' => $take_surcharge_from_vendor
						    ),
						    'tpl' => 'orders/order_notification.tpl',
                          
				    ), 'C', $order_info['lang_code']);
				    if (!empty($edp_data)) {
						    Mailer::sendMail(array(
								    'to' => $order_info['email'],
								    'from' => 'company_orders_department',
								    'data' => array(
										    'order_info' => $order_info,
										    'edp_data' => $edp_data,
								    ),
								    'tpl' => 'orders/edp_access.tpl',
                                   
						    ), 'C', $order_info['lang_code']);
				    }
		    }

In this case the name and the address will be taken from the settings of the MVE owner'company.

Best regards, Alt-team.

ADD-ONS  Web development service  | CS-Cart dedicated developers

Buy MULTIVENDOR - USD 1250 (14% off)   Buy CS-CART LICENCE - USD 345 (13% off)

 Email - manager@alt-team.com | Skype - Altteam    


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

Posted 16 December 2014 - 12:24 PM #6

If you want to use e-mail defined in the settings, just replace:

'from' => 'company_orders_department',

with

'from' => 'default_company_orders_department',

in mentioned part of code. Thanks.
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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Alt-team
  • CS-Cart Developer
  • Authorized Reseller
  • Join Date: 18-Jan 11
  • 2825 posts

Posted 16 December 2014 - 12:48 PM #7

We have thought about this variant at first, but we were not sure that it will work correctly. Have no time to check it.

But our variant is also correct.

If you have any other questions, please contact us. We are happy to answer!

Best regards, Alt-team.

ADD-ONS  Web development service  | CS-Cart dedicated developers

Buy MULTIVENDOR - USD 1250 (14% off)   Buy CS-CART LICENCE - USD 345 (13% off)

 Email - manager@alt-team.com | Skype - Altteam    


 
  • sts25
  • Advanced Member
  • Members
  • Join Date: 17-Jan 15
  • 54 posts

Posted 03 March 2015 - 10:55 AM #8

Hi guys,

I have the same issue and I am not able to fix it:

On the fn.cart.php file I have changed this line:

'from' => 'company_orders_department',

with

'from' => 'myemail@domain.com',

but the email is no longer send. It seems nothing works except "company_orders_department". Do you know where is "company_orders_department" defined?

I would like to change just the name which appears into the 'From' field on the email the users receive after they make an order. The sender email can remain as it is.

Please advise.
Thanks!

 
  • sts25
  • Advanced Member
  • Members
  • Join Date: 17-Jan 15
  • 54 posts

Posted 03 March 2015 - 03:09 PM #9

I managed to fix it by adding the bolded code into the app/functions/fn.cart.php file:

// Notify customer
if ($notify_user == true) {

$_from = array(
'email' => 'muemail@domain.com',
'name' => 'New_Name'
);


Mailer::sendMail(array(
'to' => $order_info['email'],
'from' => $_from,
'data' => array(...
..............................

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

Posted 03 March 2015 - 03:16 PM #10

Thank you for sharing this information
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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • samivohra
  • Junior Member
  • Members
  • Join Date: 03-Mar 09
  • 25 posts

Posted 25 March 2015 - 10:26 AM #11

Is there any way to customer get email from mydomain.com and also a link of vendor or vendor details who is selling it . Please guide

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

Posted 25 March 2015 - 04:20 PM #12

Is there any way to customer get email from mydomain.com and also a link of vendor or vendor details who is selling it . Please guide


I am afraid, no without additional code modifications
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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 

Posted 25 March 2015 - 04:59 PM #13

we are also at your service

 
  • lc242
  • Member
  • Trial users
  • Join Date: 19-Nov 20
  • 19 posts

Posted 04 March 2021 - 06:10 PM #14

I managed to fix it by adding the bolded code into the app/functions/fn.cart.php file:

// Notify customer
if ($notify_user == true) {

$_from = array(
'email' => 'muemail@domain.com',
'name' => 'New_Name'
);


Mailer::sendMail(array(
'to' => $order_info['email'],
'from' => $_from,
'data' => array(...
..............................

 

Hello,

 

I have the same problem regarding the vendor's name appearing on customers email notification (Multivendor 4.11). I don't understand where should I add that piece of code into the app/functions/fn.cart.php file. Could you please give more precision ?

 

Thanks in advance for responding.

 

LC



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12052 posts

Posted 04 March 2021 - 09:08 PM #15

Or you can just use our EZ Hide Vendor Fields addon that can also modifiy email addresses in email headers and email company content.  The docs are located here.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


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

Posted 05 March 2021 - 05:17 AM #16

For the latest versions open the following file

 

app/schemas/notifications/events.php

 

and replace

 

        UserTypes::CUSTOMER => [
            MailTransport::getId() => MailMessageSchema::create([
                'area'            => SiteArea::STOREFRONT,
                'from'            => 'company_orders_department',
                'to'              => DataValue::create('order_info.email'),
                'template_code'   => DataValue::create('template_code'),
                'legacy_template' => 'orders/order_notification.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)
            ]),
        ],
 

with

 

        UserTypes::CUSTOMER => [
            MailTransport::getId() => MailMessageSchema::create([
                'area'            => SiteArea::STOREFRONT,
                'from'            => 'default_company_orders_department',
                'to'              => DataValue::create('order_info.email'),
                'template_code'   => DataValue::create('template_code'),
                'legacy_template' => 'orders/order_notification.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)
            ]),
        ],

Then clear cache

 

(!) Not tested


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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • lc242
  • Member
  • Trial users
  • Join Date: 19-Nov 20
  • 19 posts

Posted 06 March 2021 - 03:58 PM #17

 

For the latest versions open the following file

 

app/schemas/notifications/events.php

 

and replace

 

        UserTypes::CUSTOMER => [
            MailTransport::getId() => MailMessageSchema::create([
                'area'            => SiteArea::STOREFRONT,
                'from'            => 'company_orders_department',
                'to'              => DataValue::create('order_info.email'),
                'template_code'   => DataValue::create('template_code'),
                'legacy_template' => 'orders/order_notification.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)
            ]),
        ],
 

with

 

        UserTypes::CUSTOMER => [
            MailTransport::getId() => MailMessageSchema::create([
                'area'            => SiteArea::STOREFRONT,
                'from'            => 'default_company_orders_department',
                'to'              => DataValue::create('order_info.email'),
                'template_code'   => DataValue::create('template_code'),
                'legacy_template' => 'orders/order_notification.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)
            ]),
        ],

Then clear cache

 

(!) Not tested

 

 

Hi eComLabs,

 

Thanks for your response, it actually worked.

 

Once again big thanks.

 

Regards,

LC



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

Posted 08 March 2021 - 07:44 AM #18

You are welcome! :)


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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • lc242
  • Member
  • Trial users
  • Join Date: 19-Nov 20
  • 19 posts

Posted 17 March 2021 - 10:12 AM #19

You are welcome! :)

 

Hi,

 

I just noticed that the problem was exactly the same for return notifications (RMA). Sender's name is the vendor and not the company name. Any idea of what modifications should I make?

 

Kind regards,

LC



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

Posted 17 March 2021 - 01:35 PM #20

Hi,

 

I just noticed that the problem was exactly the same for return notifications (RMA). Sender's name is the vendor and not the company name. Any idea of what modifications should I make?

 

Kind regards,

LC

 

app/addons/rma/schemas/notifications/events.post.php

 

Try to replace

'from'            => 'company_orders_department',

with

'from'            => 'default_company_orders_department',

Then clear cache

 

(!) Not tested


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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)