I'm running 1.5.6 and have a closed store that requires admin notification for access. In the notification emails I'd like to add Country and Zone, but the closest I've gotten is showing the country_id and zone_id. I've already got other stuff, like tax id in.
Here is the relevant section of catalog/model/account/customer.php
Code: Select all
// Send to main admin email if new account email is enabled
if ($this->config->get('config_account_mail')) {
$message = $this->language->get('text_signup') . "\n\n";
$message .= $this->language->get('text_website') . ' ' . $this->config->get('config_name') . "\n";
$message .= $this->language->get('text_firstname') . ' ' . $data['firstname'] . "\n";
$message .= $this->language->get('text_lastname') . ' ' . $data['lastname'] . "\n";
$message .= $this->language->get('text_customer_group') . ' ' . $customer_group_info['name'] . "\n";
if ($data['company']) {
$message .= $this->language->get('text_company') . ' ' . $data['company'] . "\n";
}
$message .= $this->language->get('text_tax_id') . ' ' . $data['tax_id'] . "\n";
$message .= $this->language->get('text_city') . ' ' . $data['city'] . "\n";
$message .= $this->language->get('text_zone') . ' ' . $data['zone_id'] . "\n";
$message .= $this->language->get('text_postcode') . ' ' . $data['postcode'] . "\n";
$message .= $this->language->get('text_country') . ' ' . $data['country_id'] . "\n";
$message .= $this->language->get('text_email') . ' ' . $data['email'] . "\n";
$message .= $this->language->get('text_telephone') . ' ' . $data['telephone'] . "\n";
$mail->setTo($this->config->get('config_email'));
$mail->setSubject(html_entity_decode($this->language->get('text_new_customer'), ENT_QUOTES, 'UTF-8'));
$mail->setText(html_entity_decode($message, ENT_QUOTES, 'UTF-8'));
$mail->send();
My email notification looks like this:
Everything but zone and country is coming through. I feel like I'm missing a function that looks up the id then finds the country and zone in the relevant tables, but it may be something simpler than that.Web Site: Name of Site
First Name: John
Last Name: Doe
Customer Group: Clients
Company: Company Name, Inc.
Tax ID: 123123123
City: Philadelphia
State: 3661
Postal Code: 19111
Country: 223
E-Mail: 44444@4.com
Telephone: 215 5555555
Any help would be greatly appreciated.