The proprietor of my OSC-based store asked that the order number be included in the "Order Process" notification emails, to assist in his organization and tracking.
All I needed was a quick hack to catalog/checkout_process.php. I offer it here. The code is added starting around line 338. My comments are preceded with "BL":
( code code code ... )
PHP Code:
if ($payment_class->email_footer) {
$email_order .= $payment_class->email_footer . "nn";
}
}
// BL: Added this line
$email_subject = EMAIL_TEXT_SUBJECT . " #" . $insert_id;
// BL: Changed EMAIL_TEXT_SUBJECT to $email_subject
tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], $email_subject, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
// send emails to other people
// BL: Changed EMAIL_TEXT_SUBJECT to $email_subject
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, $email_subject, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
(code code code ...)
Now instead of "Order Process" the subject line reads "Order Process #N" where N is the number of your new order.
If you are using the PayPal IPN module, a similar hack must be applied since that module effectively replaces checkout_process.
For IPN v1.3 it's in includes/modules/payment/paypal_ipn.php, the context is nearly identical except the order number is stored in $order_id.
2.2M2, again similar context, but the file is ext/modules/payment/paypal_ipn/ipn.php and the order number is in $_POST['invoice'].
Can't say what the case is for other versions as I have not tried them.
Bookmarks