osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Hack Offering: Put order number in email notification Subject: line

This is a discussion on Hack Offering: Put order number in email notification Subject: line within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; The proprietor of my OSC-based store asked that the order number be included in the "Order Process" ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 03-22-2007, 02:05 PM
New Member
 
Join Date: Sep 2006
Posts: 21
Thanks: 3
Thanked 12 Times in 5 Posts
Rep Power: 0
brendanl79
Default Hack Offering: Put order number in email notification Subject: line

The proprietor of my OSC-based store asked that the order number be included in the "Order Process" notification emails, to assist in his organization and tracking.

All I needed was a quick hack to catalog/checkout_process.php. I offer it here. The code is added starting around line 338. My comments are preceded with "BL":

( code code code ... )

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

// BL: Added this line
$email_subject = EMAIL_TEXT_SUBJECT . " #" . $insert_id;

// BL: Changed EMAIL_TEXT_SUBJECT to $email_subject
tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], $email_subject, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

// send emails to other people

// BL: Changed EMAIL_TEXT_SUBJECT to $email_subject

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, $email_subject, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}

(code code code ...)

Now instead of "Order Process" the subject line reads "Order Process #N" where N is the number of your new order.

If you are using the PayPal IPN module, a similar hack must be applied since that module effectively replaces checkout_process.

For IPN v1.3 it's in includes/modules/payment/paypal_ipn.php, the context is nearly identical except the order number is stored in $order_id.

2.2M2, again similar context, but the file is ext/modules/payment/paypal_ipn/ipn.php and the order number is in $_POST['invoice'].

Can't say what the case is for other versions as I have not tried them.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 6 Users Say Thank You to brendanl79 For This Useful Post:
altenter (06-08-2007), eyeofhorus (11-24-2007), Gizmor (04-12-2008), michael_s (03-22-2007), MindTwist (08-09-2007), poppatopz (03-23-2007)
Reply



Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
New Order Email Notification winerack osCMax v2 Installation issues 3 03-22-2007 09:08 AM
order number in email subject michael_s New osCommerce Contributions 0 02-16-2007 01:10 PM
Anyone implemented "order email only" hack? xtech osCommerce 2.2 Modification Help 0 08-15-2004 06:38 PM
multiable copy of Email with different subject line okatoma osCommerce 2.2 Modification Help 0 04-14-2004 07:58 PM
How to delete last line of order process email Walter osCommerce 2.2 Modification Help 1 10-21-2003 07:30 PM


All times are GMT -8. The time now is 04:16 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2008 osCMax