Page 1 of 1

(Solved) Customizing /catalog/model/checkout/order.php Sender and Subject

Posted: Sun Mar 24, 2019 1:20 am
by ajax0761
Hello, I'm trying to customize what the name on my email Sender is because I need it different than what the store settings say.
I'm also trying to customize the email subject and remove the $orderinfo store_name from it.

Here's the code examples:

Line 388:

Code: Select all

$subject = sprintf($language->get('text_new_subject'), html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'), $order_id);
Line 766:

Code: Select all

	$subject = sprintf($language->get('text_update_subject'), html_entity_decode($order_info['store_name'], ENT_QUOTES,
How do I remove $order_info['store_name'] without causing PHP errors?

Line 644 :

Code: Select all

	$mail->setSender(html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'));
How do I just set it to the sender name I want, such as "Support Staff" instead of all this code?

I've tried modifying deleting the code and manually entering the info I want surrounded by '' marks and it works, but then orders hang due to PHP errors.
Thanks!

Re: Customizing /catalog/model/checkout/order.php Sender and Subject

Posted: Sun Mar 24, 2019 6:20 am
by straightlight

Code: Select all

$subject = sprintf($language->get('text_new_subject'), html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'), $order_id);
for:

Code: Select all

$subject = sprintf($language->get('text_new_subject'), html_entity_decode('Support Staff', ENT_QUOTES, 'UTF-8'), $order_id);
and:

Code: Select all

$mail->setSender(html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'));
for:

Code: Select all

$mail->setSender(html_entity_decode('Support Staff', ENT_QUOTES, 'UTF-8'));

Re: Customizing /catalog/model/checkout/order.php Sender and Subject

Posted: Mon Mar 25, 2019 12:03 am
by ajax0761
Thankyou this worked! Changing subject to "solved"