New Zenner
- Join Date:
- Oct 2007
- Posts:
- 61
- Plugin Contributions:
- 0
Adding custom field to Order Confirmation Email
Hi All! I have added a custom field to the order table and would like it to show up on the order confirmation emails. I have added it to display in the admin/orders.php and that works fine. I am having trouble with the code for the email. Here is what I have so far. In the classes/order.php file, I have added the field to the $order_query, and added it to the $this->info = array.
In the send_order_email function.. here is the part I have changed (only the line starting with 'Web...):
//intro area
$email_order = EMAIL_TEXT_HEADER . EMAIL_TEXT_FROM . STORE_NAME . "\n\n" .
$this->customer['firstname'] . ' ' . $this->customer['lastname'] . "\n\n" .
EMAIL_THANKS_FOR_SHOPPING . "\n" . EMAIL_DETAILS_FOLLOW . "\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_TEXT_ORDER_NUMBER . ' ' . $zf_insert_id . "\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n" .
'Web Stylist: ' . $this->info['stylist'] . "\n\n" .
EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n";
On the plain text email that goes to the admins, only the title shows up, but no data shows after it. It does exist in the database.
If it matters, Im using 1.3.9h.
Any ideas?
:lookaroun