Zen Follower
- Join Date:
- Apr 2006
- Posts:
- 117
- Plugin Contributions:
- 0
Change salutation order confirmations to include gender
I'm trying to change the salutation on the order confirmation emails to the same format as the account creation emails.
The account creation emails which are generated within modules/create_account.php have a nice check on the gender, so emails can have a salutation like 'Dear Mr. ...' or Dear Ms. ...'. The order confirmation emails on the other hand use the customer first and last name.
Tried copying the code
if (ACCOUNT_GENDER == 'true') {
if ($gender == 'm') {
$email_text = sprintf(EMAIL_GREET_MR, $lastname);
} else {
$email_text = sprintf(EMAIL_GREET_MS, $lastname);
}
} else {
$email_text = sprintf(EMAIL_GREET_NONE, $firstname);
}
$html_msg['EMAIL_GREETING'] = str_replace('\n','',$email_text);
$html_msg['EMAIL_FIRST_NAME'] = $firstname;
$html_msg['EMAIL_LAST_NAME'] = $lastname;
over to classes/mytemplate/order.php but without the desired result. Also tried changing $firstname to $this->customer['firstname'] (and same for lastname) because the order.php seems to have a bit different coding approach. Again no result.
Anyone who has ever done this and could point me in the right direction?