Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

How do I add shipping paid and order total to order process email


Recommended Posts



I've tried playing around myself but since I'm not good at php or mySQL I thought I would ask. I've also search google and this forum so I hope I'm not asking the same question as someone else.


I want to add the shipping amount paid and the order total to the order process email that is sent out when the customer places the order. I know you edit this in checkout_process.php .


Here's an extract of the code. I assume I need to insert a line near the top around




  if ($order->info['comments']) {
$email_order .= tep_db_output($order->info['comments']) . "\n\n";
 $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . 
			  EMAIL_SEPARATOR . "\n" . 
			  $products_ordered . 
			  EMAIL_SEPARATOR . "\n" ;

//fast easy checkout end

 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 .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . 
				EMAIL_SEPARATOR . "\n" .
				tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";

 $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
			  EMAIL_SEPARATOR . "\n" .
			  tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
 if (is_object($$payment)) {
$email_order = "Dear customer ".$order->customer['firstname'].",

Thank you for your order.  We are now processing your order and will email you again once we have shipped your order.   

Please check your order details below.  If there are any changes, please notify us immediately at: sales@amadorajewellery.com.au 

You may also check your order status at anytime by either clicking on or copying the link below to your browser.   

$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . 
$payment_class = $$payment;
$email_order .= $order->info['payment_method'] . "\n\n";

if ($payment_class->email_footer) { 
  $email_order .= $payment_class->email_footer . "\n\n";

Link to comment
Share on other sites

This code is supposed to do that:


  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";

On someone else's site, those code lines produced this output:


Sub-Total: $10.00
United Parcel Service (1 pkg x 1 lbs total) (UPS Ground): $7.62
Low Order Fee: $5.00
Total: $22.62

Maybe your FEC contribution has thrown you a curve?


If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.


"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -


"Headers already sent" - The definitive help


"Cannot redeclare ..." - How to find/fix it


SSL Implementation Help


Like this post? "Like" it again over there >

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...