Nevermind, Urs. I was able to figure it out:
For those who want to know what is JUST THE CODE to replace (in the event you already have hacks in place to ps_order.php:
STEP 1: REPLACE THIS CODE AROUND LINE 364
$q = "SELECT first_name,last_name,user_email,order_status_name FROM #__{vm}_order_user_info,#__{vm}_orders,#__{vm}_order_status ";
WITH THIS CODE:
$q = "SELECT first_name,last_name,user_email,order_status_name,order_status_description FROM #__{vm}_order_user_info,#__{vm}_orders,#__{vm}_order_status ";
AND RIGHT AFTER THIS PRE-EXISTING CODE A FEW LINES FURTHER DOWN:
$q .= "AND order_status = order_status_code ";
ADD THIS CODE:
$q .= "AND order_status_description = order_status_description ";
STEP 2: REPLACE THIS CODE AROUND LINE 372-394:
// MAIL BODY
$message = $VM_LANG->_('HI',false) .' '. $db->f("first_name") . ($db->f("middle_name")?' '.$db->f("middle_name") : '' ). ' ' . $db->f("last_name") . ",\n\n";
$message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_SEND_MSG_1',false)."\n\n";
if( !empty($d['include_comment']) && !empty($d['order_comment']) ) {
$message .= $VM_LANG->_('PHPSHOP_ORDER_HISTORY_COMMENT_EMAIL',false).":\n";
$message .= $d['order_comment'];
$message .= "\n____________________________________________________________\n\n";
}
$message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_SEND_MSG_2',false)."\n";
$message .= "____________________________________________________________\n\n";
$message .= $db->f("order_status_name");
if( VM_REGISTRATION_TYPE != 'NO_REGISTRATION' ) {
$message .= "\n____________________________________________________________\n\n";
$message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_SEND_MSG_3',false)."\n";
$message .= $url;
}
$message .= "\n\n____________________________________________________________\n";
$message .= $dbv->f("vendor_name") . " \n";
$message .= URL."\n";
$message .= $dbv->f("contact_email");
WITH THIS CODE FROM URZ' V. 1.1.7 (ALSO WORKS IN 1.1.4):
// MAIL BODY Geändert von ub Zeile 308 ergänzt mit oder_status_description und Zeilen 330 hinzugefügt
$message = $VM_LANG->_('HI',false) .' '. $db->f("first_name") . ($db->f("middle_name")?' '.$db->f("middle_name") : '' ). ' ' . $db->f("last_name") . ",\n\n";
$message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_SEND_MSG_1',false) .' '. $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_SEND_MSG_2',false)."\n\n";
$message .= $db->f("order_status_name")."\n\n";
$message .= $db->f("order_status_description")."\n\n";
if( !empty($d['include_comment']) && !empty($d['order_comment']) ) {
$message .= $VM_LANG->_('PHPSHOP_ORDER_HISTORY_COMMENT_EMAIL',false).":\n";
$message .= $d['order_comment'];
$message .= "\n____________________________________________________________\n\n";
}
$message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_SEND_MSG_2',false)."\n";
$message .= "____________________________________________________________\n\n";
$message .= $db->f("order_status_name");
if( VM_REGISTRATION_TYPE != 'NO_REGISTRATION' ) {
$message .= "\n____________________________________________________________\n\n";
$message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_SEND_MSG_3',false)."\n";
$message .= $url;
}
$message .= "\n\n____________________________________________________________\n";
$message .= $dbv->f("vendor_name") . " \n";
$message .= URL."\n";
$message .= $dbv->f("contact_email");
For those who aren't completely following where the field entry is located, you go to the admin backend of v/m, Orders, List Orders, click the actual order link you want to edit, look at the top right of the screen and you will see 2 tabs. Click the first tab: Order Status Change and you will see Order Status drop down and a Comment box where you can input text.
Using my tracking example above, after installing the hack, the manual process would be to change the status to Shipped, and enter in the tracking number in the comments box (might want to also give the customer the URL of your shipper's tracking page where they could enter in the tracking number) and make sure the check box next to Notify Customer and Include This Comment is checked. Then click Update and the customer will now receive an e-mail with the tracking ID in it.
I'm looking into trying to figure out how to hack the e-mail itself, as it's pretty unfriendly on it's face. Will get back if I figure out a way.