Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customizing 'Extra order emails' UPS charge


petercascio

Recommended Posts

We are using an accounting package that lets us import customer details from the 'extra order' email.

 

I added all the stuff for the accounting software so it pulls out customer and order detail like this:

 

"SHIPTOCONTACT:	   " . $order->customer['firstname'] . ' ' . $order->customer['lastname'] . "\n" .

which in the email gives me

 

SHIPTOCONTACT: Peter Cascio

I need to do the same for the UPS charge but have no idea where to pull it in from as I can't see where this block originates.

 

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

I'll need it in the format" ZUPS: $7.62"

 

Any help would be much appreciated.

 

Peter

Link to comment
Share on other sites

MAKE A BACKUP BEFORE MAKING ANY EDITS

 

In checkout_process.php find this code:

 

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

Replace it with this code:

 

  for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
if ( stripos( strip_tags($order_totals[$i]['title']) , 'ted Parcel Service' ) ) {
  $email_order .=  'ZUPS:' . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
} else {
  $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
}
 }

I'm not 100% sure this will work as I haven't a way to test it.

 

If it doesn't work like you want, post an example of the new output and we'll go from there.

 

This is just an intuitive guess....

:blush:

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

Archived

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

×
×
  • Create New...