jack4ya Posted January 11, 2007 Share Posted January 11, 2007 I don't know the correct terms (sorry for that) so I'll try to explain as well as I can. I think that in admin/orders.php the emails gets formed which the client gets when the status of his order changes. It gets formed along with bits and pieces from the languange files. If I want another static line in the mail, I need to add those ans the language files also. No problems with this. But I need to display the order info on the status emails as well. Also, the name, amount etc. I tried somethig similir in checkout_process.php and that worked (see code below), but as expected I can't simply copy-paste the database info. It just doesn't work. So how do I put order/customer information on the status emails. (and actually only on the 'send statuschange', but on all statuschanges is fine also) Can anyone help me? On the dutch forum nobody is able to help me. The code in checkout_process.php (heavily modified) // lets start with the email confirmation $email_order = EMAIL_TEXT_HIGENDER . ' ' . $order->customer['lastname'] . "\n\n\n" . EMAIL_TEXT_WELCOME . "\n\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n" . EMAIL_TEXT_INVOICE_URL . ' <a href=" ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . ' "> ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . ' </a> ' . " \n\n" . EMAIL_SEPARATOR . "\n"; if ($order->info['comments']) { $email_order .= tep_db_output($order->info['comments']) . "\n\n"; } EMAIL_SEPARATOR . "\n" . $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $products_ordered . EMAIL_SEPARATOR . "\n"; for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n"; } if ($order->content_type != 'virtual') { $email_order .= EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n"; } $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n"; if (is_object($$payment)) { $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_TEXT_PAYMENT_INFO1 . "\n" . EMAIL_TEXT_PAYMENT_INFO2 . "\n" . EMAIL_TEXT_PAYMENT_INFO3 . "\n\n"; $payment_class = $$payment; $email_order .= $payment_class->title . "\n\n"; if ($payment_class->email_footer) { if ($payment_class->code == 'moneyorder') $email_order .= sprintf($payment_class->email_footer,$order->info['total'],$insert_id) . "\n\n"; else $email_order .= $payment_class->email_footer . "\n\n"; } }[/code] Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.