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" notification emails, ...



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

Connect with Facebook Register FAQDonate Members List Calendar Mark Forums Read


Reply

 

LinkBack Thread Tools
  #1  
Old 03-22-2007, 02:05 PM
New Member
 
Join Date: Sep 2006
Posts: 21
Thanks: 3
Thanked 18 Times in 5 Posts
Rep Power: 0
brendanl79 will become famous soon enough
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 ... )

PHP Code:
if ($payment_class->email_footer) {
      
$email_order .= $payment_class->email_footer "nn";
    }
  }

// 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_orderSTORE_OWNERSTORE_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_orderSTORE_OWNERSTORE_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 12 Users Say Thank You to brendanl79 For This Useful Post:
altenter (06-08-2007), calistared (06-02-2009), erwindr (04-23-2009), eyeofhorus (11-24-2007), Gizmor (04-12-2008), Marotta1 (12-19-2009), Mercatvs (10-24-2008), michael_s (03-22-2007), MindTwist (08-09-2007), poppatopz (03-23-2007), ptt81 (03-01-2010), rjavery (10-14-2009)
  #2  
Old 10-24-2008, 01:26 AM
Lurker
 
Join Date: Oct 2008
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Mercatvs is on a distinguished road
Default Re: Hack Offering: Put order number in email notification Subject: line

Hello Brendanl79,
Thank you for this very nice post.
I'm having difficulties though with getting this to work with Paypal IPN 2.3.3
Could you show me what the exact code is that I need to add/edit?

Would be very thankful if that's possible.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
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 12: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 07:42 PM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2009 osCMax
Inactive Reminders By Icora Web Design