Full service web hosting, great prices and support. Starts at $1.99/month!
Results 1 to 2 of 2

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

  1. #1
    brendanl79
    Guest


    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.

  2. #2
    Mercatvs
    Guest


    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.

Similar Threads

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

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •