Zen Cart Logo
Forums / General Questions / Changing the signature on automated emails

Changing the signature on automated emails

Views: 903

Results 1 to 7 of 7
26 May 2011, 12:09 AM
#1
damiendlskinsolution avatar

damiendlskinsolution

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Changing the signature on automated emails

Hi All,

Once again, I feel I'm gonna look stupid but after over 6 hours of searching and testing/trying, I'm asking for help.

I am looking at changing the signature at the bottom of the automated emails sent to customers (such as "status update" emails, for example).

email_template_order_status.html has $EMAIL_STORE_NAME as the signature.
My thought was to replace it by $EMAIL_MY_SIGNATURE and define it in order.php (from admin/includes/languages/english/), where the other DIV of the email template are defined.

Well, I guess I'm missing something because it isn't working.

When test "update status" emails are sent, I get:

New status: Delivered 

Please reply to this email if you have any questions.
$EMAIL_MY_SIGNATURE

:(

Could anyone shed some light on this?

in orders.php, I have:

define('EMAIL_MY_SIGNATURE', 'firstname LASTNAME<br>title<br>Company');

Thank you!

26 May 2011, 12:29 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Changing the signature on automated emails

There are several orders.php files
I can not locate $EMAIL_MY_SIGNATURE
In several that I checked

It appears that youadded it but can not locate any $EMAIL in those checked

Post the file & path and you ZenCart version

26 May 2011, 1:52 AM
#3
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: Changing the signature on automated emails

You would actually have to define it in the order class, which most of the email information are generated from...

I personally by passed all that and just added the signature to the email template.

26 May 2011, 1:59 AM
#4
damiendlskinsolution avatar

damiendlskinsolution

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Changing the signature on automated emails

Hi Kobra,

I am running ZC 1.3.9d

In /email/email_template_order_status.html, I changed this:

  <!-- Content Section -->

  <div class="content">
    <div>Dear $EMAIL_CUSTOMERS_NAME,</div>
    <div>$EMAIL_TEXT_ORDER_NUMBER</div>
    <div>$EMAIL_TEXT_INVOICE_URL</div>
    <div>$EMAIL_TEXT_DATE_ORDERED</div>
    <div>$EMAIL_TEXT_STATUS_COMMENTS</div>
    <div>$EMAIL_TEXT_STATUS_UPDATED</div>
    <div>$EMAIL_TEXT_STATUS_LABEL</div>
    <div>$EMAIL_TEXT_STATUS_PLEASE_REPLY</div>
    <!-- Changed on 05/25/2011 replacing <div>$EMAIL_STORE_NAME</div> : -->
    <div>$EMAIL_MY_SIGNATURE</div>

  </div>

  <!-- Footer Section -->

  

Considering all the other $EMAIL_TEXT_xxx above are defined in ADMIN/includes/languages/english/orders.php, this is where I added my own definition of EMAIL_MY_SIGNATURE:

(this is line 149 and following on my file)

define('EMAIL_SEPARATOR', '------------------------------------------------------');
define('EMAIL_TEXT_SUBJECT', 'Order Update');
define('EMAIL_TEXT_ORDER_NUMBER', '<br>Order Number:');
define('EMAIL_TEXT_INVOICE_URL', 'Detailed Invoice:');
define('EMAIL_TEXT_DATE_ORDERED', 'Date Ordered:');
define('EMAIL_TEXT_COMMENTS_UPDATE', '<br><br>');
define('EMAIL_TEXT_STATUS_UPDATED', 'Your order has been updated to the following status:' . "\n");
define('EMAIL_TEXT_STATUS_LABEL', '<br><strong>New status:</strong> %s' . "\n\n");
define('EMAIL_TEXT_STATUS_PLEASE_REPLY', '<br>Please reply to this email if you have any questions.<br>' . "\n");
define('EMAIL_MY_SIGNATURE', 'Firstname LASTNAME<br>Title<br>Company');

I did see other orders.php as well as orders_status.php files but only one as define statements (admin/includes/languages/english/orders.php). Modifications there didn't solve my problem neither.

Is there another file I need to modify?

All I want is to change the signature in the email sent through the Admin to update the status of an order... :(

What did I miss?

Thank you

Damien

26 May 2011, 2:07 AM
#5
damiendlskinsolution avatar

damiendlskinsolution

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Changing the signature on automated emails

CoolCarPartsOnline:

You would actually have to define it in the order class, which most of the email information are generated from...

I personally by passed all that and just added the signature to the email template.

That would make it much easier... (why again this didn't even cross my mind!?!?)

Kobra,
I'm still interested to figure out why my define isn't working though...
:smartalec: "Learning is everything"

All the best,

Damien

26 May 2011, 6:08 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Changing the signature on automated emails

DamienDLSkinSolution:

I'm still interested to figure out why my define isn't working though...
You'd have to declare it in the PHP file that assembles the email, else it won't know that you want it to do the text substitution.

  • lang file defines the text
  • PHP logic file sets up all the replacements to make, using the defined constants as the values
  • email template is loaded, and then the replacements are made in the email template based on the list prepared in the PHP file.

You've only done the first and last file, but not the business logic part in between, hence it doesn't know to do anything with what you set up.

Really THE easiest way is just to add-to or edit the existing sig/closure text in the existing define()s and put your custom text in one of those. No coding required.

26 May 2011, 6:27 PM
#7
damiendlskinsolution avatar

damiendlskinsolution

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Changing the signature on automated emails

Thank you Dr Byte! I totally missed that 2nd step. :blush:

I was reluctant editing the existing signature as it refers to the name of the store ($block['EMAIL_STORE_NAME'] = STORE_NAME; ).

I used CoolCarPartsOnline idea and simply added the custom signature in the Template of the email.

Thank again all for you help.