See if this helps get you going ...
Code:
function update(&$class, $eventID, $paramsArray = array()) {
global $order;
global $order_totals;
for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
if ($order_totals[$i]['title'] = 'Total:') {
$this_order_total = strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']);
}
}
define('EMAIL_SUBJECT_CC_MSG', 'An important note about your recent purchase.');
if ($order->info['payment_module_code'] == 'moneygram') {
define('EMAIL_TEXT_CC_MSG',
'Dear ' . $order->customer['firstname'] . ' ' . $order->customer['lastname'] . "\n\n" .
'Thank you so much for placing an order with us. Please submit your payment of ' . $this_order_total . ' for order number ' . $paramsArray[0] . '. You may use the following details to complete your Money Gram Money Transfer...' . "\n\n"
);
}
if ($order->info['payment_module_code'] == 'moneyorder') {
define('EMAIL_TEXT_CC_MSG',
'Dear ' . $order->customer['firstname'] . ' ' . $order->customer['lastname'] . "\n" .
'Thank you so much for placing an order with us. Please submit your payment of ' . $this_order_total . ' for order number ' . $paramsArray[0] . '. You may use the following details to complete your Money Order ...' . "\n\n"
);
}
zen_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_SUBJECT_CC_MSG, EMAIL_TEXT_CC_MSG, STORE_OWNER, EMAIL_FROM, array('EMAIL_MESSAGE_HTML' => nl2br(EMAIL_TEXT_CC_MSG)),'ccnotice');
}
NOTE: I do not know your payment module info on payment_module_code for moneygram so I just stuck in there moneygram ... use the right one for this ...
Bookmarks