Ralph2 Posted February 19, 2007 Share Posted February 19, 2007 For those who use the osCommerce PayPal IPN Module v1.0 For 2.2MS2 module: This module suffers from a bug which doesn't place a customer's comment (entered during the order process) in the confirmation email. Thanks to an inspirational post on the Dutch osC forum, by user Job, the solution has been found: 1 - If you're using this particular module, then open ipn.php. 2 - Find: // lets start with the email confirmation // $order variables have been changed from checkout_process to work with the variables from the function query () instead of cart () in the order class $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $_POST['invoice'] . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $_POST['invoice'], 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; if ($order->info['comments']) { $email_order .= tep_db_output($order->info['comments']) . "\n\n"; } 3 - And replace this with: // lets start with the email confirmation // $order variables have been changed from checkout_process to work with the variables from the function query () instead of cart () in the order class $comment_query = tep_db_query("select comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . $_POST['invoice'] . "'"); $commentfetch = tep_db_fetch_array($comment_query); $comments = $commentfetch['comments']; $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $_POST['invoice'] . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $_POST['invoice'], 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; if ($comments) { $email_order .= $comments . "\n\n"; } Done :) Quote Link to comment Share on other sites More sharing options...
tigergirl Posted July 5, 2007 Share Posted July 5, 2007 Finally managed to get round to doing this - seems to work fine for me. Thanks very much for this fix Tigergirl Quote I'm feeling lucky today......maybe someone will answer my post! I do try and answer a simple post when I can just to give something back. ------------------------------------------------ PM me? - I'm not for hire Link to comment Share on other sites More sharing options...
Guest Posted July 5, 2007 Share Posted July 5, 2007 For those who use the osCommerce PayPal IPN Module v1.0 For 2.2MS2 module: This module suffers from a bug which doesn't place a customer's comment (entered during the order process) in the confirmation email. Thanks to an inspirational post on the Dutch osC forum, by user Job, the solution has been found: 1 - If you're using this particular module, then open ipn.php. 2 - Find: // lets start with the email confirmation // $order variables have been changed from checkout_process to work with the variables from the function query () instead of cart () in the order class $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $_POST['invoice'] . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $_POST['invoice'], 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; if ($order->info['comments']) { $email_order .= tep_db_output($order->info['comments']) . "\n\n"; } 3 - And replace this with: // lets start with the email confirmation // $order variables have been changed from checkout_process to work with the variables from the function query () instead of cart () in the order class $comment_query = tep_db_query("select comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . $_POST['invoice'] . "'"); $commentfetch = tep_db_fetch_array($comment_query); $comments = $commentfetch['comments']; $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $_POST['invoice'] . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $_POST['invoice'], 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; if ($comments) { $email_order .= $comments . "\n\n"; } Done :) I would have thought that info would go in the contrib and in its support thread. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.