Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Package Tracking with Email Notification Mods


olsonsp4c

Recommended Posts

  • Replies 274
  • Created
  • Last Reply

Top Posters In This Topic

I do not kno which file to change in the paypal ipn. When customers placed order and paid with paypal, no email has been sent out.

 

it depends on which addon and which version.

 

Scott

Link to comment
Share on other sites

Where di dthis contribution go? I cannot find it in the add ons site.

 

lildog

 

I renamed it "Package Tracking Plus" - search for that lildog

 

Scott

Link to comment
Share on other sites

First of all let me thank you for the great Contribution. I've had no problems with this cont. in the past on "normal" oscommerce setups. However this one is a little different! I am running 2.2-MS2 with the order editor 5.0.63 (djmonkley's) installed. I've gotten everything to work with the exception of the tracking. I'm at the point of frustration because I've gone through all of the coding and everything appears to be in place. I can manually enter a tracking number in the database and it shows up on the customers side, however not in the order editor. The boxes do show in the order editor, but the tracking just will not post to the database. I'm going to keep at it, but I thought I would ask for some help while I continue to bash my head against the monitor! :angry:

 

 

FYI for anyone out there who is also setting this up. A mod to edit_orders_ajax is required as shown below.

 

In order to get the notify customer and send comments check boxes to work (along with other slight email errors) the following is required in the edit_order_ajax.php:

 

The first mod is direct from #5, the second is slightly modified. Again this is only if you are using djmonkey's order editor 5.0.63

 

On or about line 535:

$check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, usps_track_num, usps_track_num2, ups_track_num, ups_track_num2, fedex_track_num, fedex_track_num2, dhl_track_num, dhl_track_num2, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");

 

On or about line 546:

$customer_notified = '0';
         if ($_GET['notify'] == 'true' & ($usps_track_num == '' & $usps_track_num2 == '' & $ups_track_num == '' & $ups_track_num2 == '' & $fedex_track_num == '' & $fedex_track_num2 == '' & $dhl_track_num == '' & $dhl_track_num2 == '' ) ) {
           $notify_comments = '';
           if ($_GET['notify_comments'] == 'true') {
             $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n";
             if ($comments == null)
               $notify_comments = '';
                       }

           $email = 'Dear ' . $check_status['customers_name'] . ',' . "\n\n" . STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . (int)$oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "'>" .  'order_id=' . (int)$oID . "</a>\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n" . EMAIL_SEPARATOR . "\n\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);
           tep_mail($check_status['customers_name'], $check_status['customers_email_address'], STORE_NAME . ' ' . EMAIL_TEXT_SUBJECT_1. (int)$oID . EMAIL_TEXT_SUBJECT_2 . $orders_status_array[$status], $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
           $customer_notified = '1';

 }else   if ($_GET['notify'] == 'true' & ($usps_track_num == '' or $usps_track_num2 == '' or $ups_track_num == '' or $ups_track_num2 == '' or $fedex_track_num == '' or $fedex_track_num2 == '' or $dhl_track_num == '' or $dhl_track_num2 == '' ) ) {
           $notify_comments = '';
           if ($_GET['notify_comments'] == 'true') {
             $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n";
             if ($comments == null)
               $notify_comments = '';
                       }
           if ($usps_track_num == null) {
             $usps_text = '';
		  $usps_track = '';
            }else{
             $usps_text = 'USPS(1): ';
             $usps_track_num_noblanks = str_replace(' ', '', $usps_track_num);
             $usps_link = 'http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=' . $usps_track_num_noblanks;
             $usps_track = '<a target="_blank" href="' . $usps_link . '">' . $usps_track_num . '</a>' . "\n";
           }
           if ($usps_track_num2 == null) {
             $usps_text2 = '';
		  $usps_track2 = '';
            }else{
             $usps_text2 = 'USPS(2): ';
             $usps_track_num2_noblanks = str_replace(' ', '', $usps_track_num2);
             $usps_link2 = 'http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=' . $usps_track_num2_noblanks;
             $usps_track2 = '<a target="_blank" href="' . $usps_link2 . '">' . $usps_track_num2 . '</a>' . "\n";
           }
           if ($ups_track_num == null) {
             $ups_text = '';
		  $ups_track = '';
            }else{
             $ups_text = 'UPS(1): ';
             $ups_track_num_noblanks = str_replace(' ', '', $ups_track_num);
             $ups_link = 'http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=' . $ups_track_num_noblanks . '&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&TypeOfInquiryNumber=T&UPS_HTML_Version=3.0&IATA=us&Lang=en&submit=Track+Package ';
             $ups_track = '<a target="_blank" href="' . $ups_link . '">' . $ups_track_num . '</a>' . "\n";
           }
           if ($ups_track_num2 == null) {
             $ups_text2 = '';
		  $ups_track2 = '';
            }else{
             $ups_text2 = 'UPS(2): ';
             $ups_track_num2_noblanks = str_replace(' ', '', $ups_track_num2);
             $ups_link2 = 'http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=' . $ups_track_num2_noblanks . '&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&TypeOfInquiryNumber=T&UPS_HTML_Version=3.0&IATA=us&Lang=en&submit=Track+Package ';
             $ups_track2 = '<a target="_blank" href="' . $ups_link2 . '">' . $ups_track_num2 . '</a>' . "\n";
           }
           if ($fedex_track_num == null) {
             $fedex_text = '';
		  $fedex_track = '';
            }else{
             $fedex_text = 'Fedex(1): ';
             $fedex_track_num_noblanks = str_replace(' ', '', $fedex_track_num);
             $fedex_link = 'http://www.fedex.com/Tracking?tracknumbers=' . $fedex_track_num_noblanks . '&action=track&language=english&cntry_code=us';
             $fedex_track = '<a target="_blank" href="' . $fedex_link . '">' . $fedex_track_num . '</a>' . "\n";
           }
           if ($fedex_track_num2 == null) {
             $fedex_text2 = '';
		  $fedex_track2 = '';
            }else{
             $fedex_text2 = 'Fedex(2): ';
             $fedex_track_num2_noblanks = str_replace(' ', '', $fedex_track_num2);
             $fedex_link2 = 'http://www.fedex.com/Tracking?tracknumbers=' . $fedex_track_num2_noblanks . '&action=track&language=english&cntry_code=us';
             $fedex_track2 = '<a target="_blank" href="' . $fedex_link2 . '">' . $fedex_track_num2 . '</a>' . "\n";
           }
           if ($dhl_track_num == null) {
             $dhl_text = '';
		  $dhl_track = '';
            }else{
             $dhl_text = 'DHL(1): ';
             $dhl_track_num_noblanks = str_replace(' ', '', $dhl_track_num);
             $dhl_link = 'http://track.dhl-usa.com/atrknav.asp?ShipmentNumber=' . $dhl_track_num_noblanks . '&action=track&language=english&cntry_code=us';
             $dhl_track = '<a target="_blank" href="' . $dhl_link . '">' . $dhl_track_num . '</a>' . "\n";
           }
           if ($dhl_track_num2 == null) {
             $dhl_text2 = '';
		  $dhl_track2 = '';
            }else{
             $dhl_text2 = 'DHL(2): ';
             $dhl_track_num2_noblanks = str_replace(' ', '', $dhl_track_num2);
             $dhl_link2 = 'http://track.dhl-usa.com/atrknav.asp?ShipmentNumber=' . $dhl_track_num2_noblanks . '&action=track&language=english&cntry_code=us';
             $dhl_track2 = '<a target="_blank" href="' . $dhl_link2 . '">' . $dhl_track_num2 . '</a>' . "\n";
           }

           $email = 'Dear ' . $check_status['customers_name'] . ',' . "\n\n" . STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . (int)$oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "'>" .  'order_id=' . (int)$oID . "</a>\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_TRACKING_NUMBER . "\n" . $usps_text . $usps_track . $usps_text2 . $usps_track2 . $ups_text . $ups_track . $ups_text2 . $ups_track2 . $fedex_text . $fedex_track . $fedex_text2 . $fedex_track2 . $dhl_text . $dhl_track . $dhl_text2 . $dhl_track2 . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);
           tep_mail($check_status['customers_name'], $check_status['customers_email_address'], STORE_NAME . ' ' . EMAIL_TEXT_SUBJECT_1. (int)$oID . EMAIL_TEXT_SUBJECT_2 . $orders_status_array[$status], $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
           $customer_notified = '1';

 }else   if ($_GET['notify'] == 'true' & (tep_not_null($usps_track_num) & tep_not_null($usps_track_num2) & tep_not_null($ups_track_num) & tep_not_null($ups_track_num2) & tep_not_null($fedex_track_num) & tep_not_null($fedex_track_num2) & tep_not_null($dhl_track_num) & tep_not_null($dhl_track_num2) ) ) {
         $notify_comments = '';
         $usps_text = 'USPS(1): ';
         $usps_track_num_noblanks = str_replace(' ', '', $usps_track_num);
         $usps_link = 'http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=' . $usps_track_num_noblanks;
         $usps_track = '<a target="_blank" href="' . $usps_link . '">' . $usps_track_num . '</a>' . "\n";
         $usps_text2 = 'USPS(2): ';
         $usps_track_num2_noblanks = str_replace(' ', '', $usps_track_num2);
         $usps_link2 = 'http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=' . $usps_track_num2_noblanks;
         $usps_track2 = '<a target="_blank" href="' . $usps_link2 . '">' . $usps_track_num2 . '</a>' . "\n";
         $ups_text = 'UPS(1): ';
         $ups_track_num_noblanks = str_replace(' ', '', $ups_track_num);
         $ups_link = 'http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=' . $ups_track_num_noblanks . '&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&TypeOfInquiryNumber=T&UPS_HTML_Version=3.0&IATA=us&Lang=en&submit=Track+Package ';
         $ups_track = '<a target="_blank" href="' . $ups_link . '">' . $ups_track_num . '</a>' . "\n";
         $ups_text2 = 'UPS(2): ';
         $ups_track_num2_noblanks = str_replace(' ', '', $ups_track_num2);
         $ups_link2 = 'http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=' . $ups_track_num2_noblanks . '&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&TypeOfInquiryNumber=T&UPS_HTML_Version=3.0&IATA=us&Lang=en&submit=Track+Package ';
         $ups_track2 = '<a target="_blank" href="' . $ups_link2 . '">' . $ups_track_num2 . '</a>' . "\n";
         $fedex_text = 'Fedex(1): ';
         $fedex_track_num_noblanks = str_replace(' ', '', $fedex_track_num);
         $fedex_link = 'http://www.fedex.com/Tracking?tracknumbers=' . $fedex_track_num_noblanks . '&action=track&language=english&cntry_code=us';
         $fedex_track = '<a target="_blank" href="' . $fedex_link . '">' . $fedex_track_num . '</a>' . "\n";
         $fedex_text2 = 'Fedex(2): ';
         $fedex_track_num2_noblanks = str_replace(' ', '', $fedex_track_num2);
         $fedex_link2 = 'http://www.fedex.com/Tracking?tracknumbers=' . $fedex_track_num2_noblanks . '&action=track&language=english&cntry_code=us';
         $fedex_track2 = '<a target="_blank" href="' . $fedex_link2 . '">' . $fedex_track_num2 . '</a>' . "\n";
         $dhl_text = 'DHL(1): ';
         $dhl_track_num_noblanks = str_replace(' ', '', $dhl_track_num);
         $dhl_link = 'http://track.dhl-usa.com/atrknav.asp?ShipmentNumber=' . $dhl_track_num_noblanks . '&action=track&language=english&cntry_code=us';
         $dhl_track = '<a target="_blank" href="' . $dhl_link . '">' . $dhl_track_num . '</a>' . "\n";
         $dhl_text2 = 'DHL(2): ';
         $dhl_track_num2_noblanks = str_replace(' ', '', $dhl_track_num2);
         $dhl_link2 = 'http://track.dhl-usa.com/atrknav.asp?ShipmentNumber=' . $dhl_track_num2_noblanks . '&action=track&language=english&cntry_code=us';
         $dhl_track2 = '<a target="_blank" href="' . $dhl_link2 . '">' . $dhl_track_num2 . '</a>' . "\n";
         if ($_GET['notify_comments'] == 'true') {
           $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n";
           if ($comments == null)
               $notify_comments = '';
                       }

           $email = 'Dear ' . $check_status['customers_name'] . ',' . "\n\n" . STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . (int)$oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "'>" .  'order_id=' . (int)$oID . "</a>\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_TRACKING_NUMBER . "\n" . $usps_text . $usps_track . $usps_text2 . $usps_track2 . $ups_text . $ups_track . $ups_text2 . $ups_track2 . $fedex_text . $fedex_track . $fedex_text2 . $fedex_track2 . $dhl_text . $dhl_track . $dhl_text2 . $dhl_track2 . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);
           tep_mail($check_status['customers_name'], $check_status['customers_email_address'], STORE_NAME . ' ' . EMAIL_TEXT_SUBJECT_1 . (int)$oID . EMAIL_TEXT_SUBJECT_2 . $orders_status_array[$status], $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
           $customer_notified = '1';
        }

Link to comment
Share on other sites

I got the tracking to show up in the order editor with the following mod:

 

The following needs modification in admin/order_editor/order.php

On or about line 53:

'usps_track_num' => $order['usps_track_num'],
                         'usps_track_num2' => $order['usps_track_num2'],
                         'ups_track_num' => $order['ups_track_num'],
                         'ups_track_num2' => $order['ups_track_num2'],
                         'fedex_track_num' => $order['fedex_track_num'],
                         'fedex_track_num2' => $order['fedex_track_num2'],
                         'dhl_track_num' => $order['dhl_track_num'],
                         'dhl_track_num2' => $order['dhl_track_num2'],

 

I still can't get it to post!

 

Help!

Link to comment
Share on other sites

I apologize - I don't think I'll be able to help with this one as I'm just not familiar with the updated ajax stuff... anyone else out there who can help?

 

Scott

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

 

All of a sudden my order emails coming missing definitions in Subject: Store EMAIL_TEXT_SUBJECT_1517 EMAIL_TEXT_SUBJECT_2. I thought may be my definition file /includes/languages/english/checkout_process.php became somehow corrupted, but it seems ok and the definitions are there:

define('EMAIL_TEXT_SUBJECT_1', ' Order # ');
define('EMAIL_TEXT_SUBJECT_2', 'has been received');

In my checkout_process.php I have:

tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], STORE_NAME . ' ' . EMAIL_TEXT_SUBJECT_1 . '' . $insert_id . ' ' . EMAIL_TEXT_SUBJECT_2, $email_order, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);

//store order number in insert_id for mime export.
$insert_id = $order_id;

// send emails to other people
 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
$email_order .= 'Print Invoice: '. "<a HREF='" .tep_href_link(FILENAME_INVOICE_PRINT, 'oID=' . $insert_id, 'SSL') . "'>" . 'order_id = ' . $insert_id . "</a>\n";
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, STORE_NAME . ' ' . EMAIL_TEXT_SUBJECT_1 . '' . $insert_id . ' ' . EMAIL_TEXT_SUBJECT_2, $email_order, $order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address']);
 }

What else might cause the problem with broken definitions? Any help will be appreciated.

 

Thanks.

Link to comment
Share on other sites

Hello,

 

All of a sudden my order emails coming missing definitions in Subject: Store EMAIL_TEXT_SUBJECT_1517 EMAIL_TEXT_SUBJECT_2. I thought may be my definition file /includes/languages/english/checkout_process.php became somehow corrupted, but it seems ok and the definitions are there:

define('EMAIL_TEXT_SUBJECT_1', ' Order # ');
define('EMAIL_TEXT_SUBJECT_2', 'has been received');

In my checkout_process.php I have:

tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], STORE_NAME . ' ' . EMAIL_TEXT_SUBJECT_1 . '' . $insert_id . ' ' . EMAIL_TEXT_SUBJECT_2, $email_order, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);

//store order number in insert_id for mime export.
$insert_id = $order_id;

// send emails to other people
  if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
 $email_order .= 'Print Invoice: '. "<a HREF='" .tep_href_link(FILENAME_INVOICE_PRINT, 'oID=' . $insert_id, 'SSL') . "'>" . 'order_id = ' . $insert_id . "</a>\n";
 tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, STORE_NAME . ' ' . EMAIL_TEXT_SUBJECT_1 . '' . $insert_id . ' ' . EMAIL_TEXT_SUBJECT_2, $email_order, $order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address']);
  }

What else might cause the problem with broken definitions? Any help will be appreciated.

 

Thanks.

 

Most likely it is because your customers used Paypal to pay for the order - you must merge all changes to checkout_process.php into your paypal file in the appropriate place OR you are using another payment module that requires you to merge changes to checkout_process.php into your payment file.

 

Scott

Link to comment
Share on other sites

Most likely it is because your customers used Paypal to pay for the order - you must merge all changes to checkout_process.php into your paypal file in the appropriate place OR you are using another payment module that requires you to merge changes to checkout_process.php into your payment file.

 

Scott

Hi Scott,

 

No, the problem is with the orders paid by Credit Card and not the PayPal. PayPal seems to work fine though. The credit card payment is processed via Authorize.net SIM. Any ideas?

 

Thanks.

Edited by Irin
Link to comment
Share on other sites

The only idea I have is to download fresh of both checkout_process.php and the english file and merge them with your existing files and then upload. see if that works.

 

Scott

Link to comment
Share on other sites

  • 1 month later...

Hello everyone. I followed the instructions EXACTLY to install this contrib. Now when I log into my Admin panel and go to "Orders", I am receiving the following error:

 

Parse error: syntax error, unexpected T_CASE in /home/kitchens/public_html/admin/orders.php on line 286

 

Here is the code from lines 29 to 308. I really hope someone can help me get this fixed ASAP. Thanks!

  if (tep_not_null($action)) {
switch ($action) {
  case 'update_order':
	$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
	$status = tep_db_prepare_input($HTTP_POST_VARS['status']);
	$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
//Package Tracking Plus BEGIN
	$usps_track_num = tep_db_prepare_input($HTTP_POST_VARS['usps_track_num']);
	$usps_track_num2 = tep_db_prepare_input($HTTP_POST_VARS['usps_track_num2']);
	$ups_track_num = tep_db_prepare_input($HTTP_POST_VARS['ups_track_num']);
	$ups_track_num2 = tep_db_prepare_input($HTTP_POST_VARS['ups_track_num2']);
	$fedex_track_num = tep_db_prepare_input($HTTP_POST_VARS['fedex_track_num']);
	$fedex_track_num2 = tep_db_prepare_input($HTTP_POST_VARS['fedex_track_num2']);
	$dhl_track_num = tep_db_prepare_input($HTTP_POST_VARS['dhl_track_num']);
	$dhl_track_num2 = tep_db_prepare_input($HTTP_POST_VARS['dhl_track_num2']);
//Package Tracking Plus END

	$order_updated = false;
	//Package Tracking Plus BEGIN
	$check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, usps_track_num, usps_track_num2, ups_track_num, ups_track_num2, fedex_track_num, fedex_track_num2, dhl_track_num, dhl_track_num2, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");
//Package Tracking Plus END
	$check_status = tep_db_fetch_array($check_status_query);

	if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) {
// {{ buySAFE Module
	  if ($check_status['orders_status'] != $status && $status == '88888') // change to Canceled
	  {
		$buysafe_check = tep_db_fetch_array(tep_db_query("select orders_id, buysafe_cart_id, buysafe_client_ip, buysafe_session_id, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"));
		if (tep_not_null($buysafe_check['buysafe_cart_id']))
		{
		  $class = 'buysafe';
		  $buysafe_directory = DIR_FS_CATALOG_MODULES . 'buySAFE/';
		  $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
		  if (file_exists($buysafe_directory . $class . $file_extension))
		  {
			include($buysafe_directory . $class . $file_extension);
			$buysafe = new $class;
			$buysafe_result = $buysafe->call_api('SetShoppingCartCancelOrder', $buysafe_check);
			if (tep_not_null($buysafe_result['faultstring']))
			{
			  $messageStack->add_session('buySAFE fault: ' . $buysafe_result['faultstring'], 'error');
			  tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit'));
			}
		  }
		}
	  }
	  if ($check_status['orders_status'] != $status && $check_status['orders_status'] == '88888') // change from Canceled
	  {
		$buysafe_check = tep_db_fetch_array(tep_db_query("select orders_id, buysafe_cart_id, buysafe_client_ip, buysafe_session_id, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"));
		if (tep_not_null($buysafe_check['buysafe_cart_id']))
		{
		  include(DIR_WS_CLASSES . 'order.php');
		  $order = new order($oID);
		  $class = 'buysafe';
		  $buysafe_directory = DIR_FS_CATALOG_MODULES . 'buySAFE/';
		  $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
		  if (file_exists($buysafe_directory . $class . $file_extension))
		  {
			include($buysafe_directory . $class . $file_extension);
			$buysafe = new $class;
			$buysafe_check['WantsBond'] = 'true';
			$buysafe_check['buysafe_previous_cart_id'] = $buysafe_check['buysafe_cart_id'];
			$buysafe_check['buysafe_cart_id'] .= 'r';
			$buysafe_result = $buysafe->call_api('AddUpdateShoppingCart', $buysafe_check, $order);
			if ($buysafe_result['IsBuySafeEnabled'] != 'true')
			{
			  $messageStack->add_session('buySAFE fault: ' . $buysafe_result['faultstring'], 'error');
			  tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit'));
			}
			$buysafe_result = $buysafe->call_api('SetShoppingCartCheckout', $buysafe_check, $order);
			if ($buysafe_result['IsBuySafeEnabled'] != 'true')
			{
			  $messageStack->add_session('buySAFE fault: ' . $buysafe_result['faultstring'], 'error');
			  tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit'));
			}
			else
			{
			  tep_db_query("update " . TABLE_ORDERS . " set buysafe_cart_id = '" . tep_db_input($buysafe_check['buysafe_cart_id']) . "' where orders_id = '" . (int)$oID . "'");
			}
		  }
		}
	  }
// }}		   
	  tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'");
	  //Package Tracking Plus BEGIN
	  $customer_notified = '0';
	  if ($HTTP_POST_VARS['notify'] == 'on' & ($usps_track_num == '' & $usps_track_num2 == '' & $ups_track_num == '' & $ups_track_num2 == '' & $fedex_track_num == '' & $fedex_track_num2 == '' & $dhl_track_num == '' & $dhl_track_num2 == '' ) ) {
		$notify_comments = '';
		if ($HTTP_POST_VARS['notify_comments'] == 'on') {
		  $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n";
		  if ($comments == null)
			$notify_comments = '';
					}

		$email = 'Dear ' . $check_status['customers_name'] . ',' . "\n\n" . STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . (int)$oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "'>" .  'order_id=' . (int)$oID . "</a>\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n" . EMAIL_SEPARATOR . "\n\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);
		tep_mail($check_status['customers_name'], $check_status['customers_email_address'], STORE_NAME . ' ' . EMAIL_TEXT_SUBJECT_1. (int)$oID . EMAIL_TEXT_SUBJECT_2 . $orders_status_array[$status], $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
		$customer_notified = '1';

 }else   if ($HTTP_POST_VARS['notify'] == 'on' & ($usps_track_num == '' or $usps_track_num2 == '' or $ups_track_num == '' or $ups_track_num2 == '' or $fedex_track_num == '' or $fedex_track_num2 == '' or $dhl_track_num == '' or $dhl_track_num2 == '' ) ) {
		$notify_comments = '';
		if ($HTTP_POST_VARS['notify_comments'] == 'on') {
		  $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n";
		  if ($comments == null)
			$notify_comments = '';
					}
		if ($usps_track_num == null) {
		  $usps_text = '';
		  $usps_track = '';
		 }else{
		  $usps_text = 'USPS(1): ';
		  $usps_track_num_noblanks = str_replace(' ', '', $usps_track_num);
		  $usps_link = 'http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=' . $usps_track_num_noblanks;
		  $usps_track = '<a target="_blank" href="' . $usps_link . '">' . $usps_track_num . '</a>' . "\n";
		}
		if ($usps_track_num2 == null) {
		  $usps_text2 = '';
		  $usps_track2 = '';
		 }else{
		  $usps_text2 = 'USPS(2): ';
		  $usps_track_num2_noblanks = str_replace(' ', '', $usps_track_num2);
		  $usps_link2 = 'http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=' . $usps_track_num2_noblanks;
		  $usps_track2 = '<a target="_blank" href="' . $usps_link2 . '">' . $usps_track_num2 . '</a>' . "\n";
		}
		if ($ups_track_num == null) {
		  $ups_text = '';
		  $ups_track = '';
		 }else{
		  $ups_text = 'UPS(1): ';
		  $ups_track_num_noblanks = str_replace(' ', '', $ups_track_num);
		  $ups_link = 'http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=' . $ups_track_num_noblanks . '&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&TypeOfInquiryNumber=T&UPS_HTML_Version=3.0&IATA=us&Lang=en&submit=Track+Package ';
		  $ups_track = '<a target="_blank" href="' . $ups_link . '">' . $ups_track_num . '</a>' . "\n";
		}
		if ($ups_track_num2 == null) {
		  $ups_text2 = '';
		  $ups_track2 = '';
		 }else{
		  $ups_text2 = 'UPS(2): ';
		  $ups_track_num2_noblanks = str_replace(' ', '', $ups_track_num2);
		  $ups_link2 = 'http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=' . $ups_track_num2_noblanks . '&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&TypeOfInquiryNumber=T&UPS_HTML_Version=3.0&IATA=us&Lang=en&submit=Track+Package ';
		  $ups_track2 = '<a target="_blank" href="' . $ups_link2 . '">' . $ups_track_num2 . '</a>' . "\n";
		}
		if ($fedex_track_num == null) {
		  $fedex_text = '';
		  $fedex_track = '';
		 }else{
		  $fedex_text = 'Fedex(1): ';
		  $fedex_track_num_noblanks = str_replace(' ', '', $fedex_track_num);
		  $fedex_link = 'http://www.fedex.com/Tracking?tracknumbers=' . $fedex_track_num_noblanks . '&action=track&language=english&cntry_code=us';
		  $fedex_track = '<a target="_blank" href="' . $fedex_link . '">' . $fedex_track_num . '</a>' . "\n";
		}
		if ($fedex_track_num2 == null) {
		  $fedex_text2 = '';
		  $fedex_track2 = '';
		 }else{
		  $fedex_text2 = 'Fedex(2): ';
		  $fedex_track_num2_noblanks = str_replace(' ', '', $fedex_track_num2);
		  $fedex_link2 = 'http://www.fedex.com/Tracking?tracknumbers=' . $fedex_track_num2_noblanks . '&action=track&language=english&cntry_code=us';
		  $fedex_track2 = '<a target="_blank" href="' . $fedex_link2 . '">' . $fedex_track_num2 . '</a>' . "\n";
		}
		if ($dhl_track_num == null) {
		  $dhl_text = '';
		  $dhl_track = '';
		 }else{
		  $dhl_text = 'DHL(1): ';
		  $dhl_track_num_noblanks = str_replace(' ', '', $dhl_track_num);
		  $dhl_link = 'http://track.dhl-usa.com/atrknav.asp?ShipmentNumber=' . $dhl_track_num_noblanks . '&action=track&language=english&cntry_code=us';
		  $dhl_track = '<a target="_blank" href="' . $dhl_link . '">' . $dhl_track_num . '</a>' . "\n";
		}
		if ($dhl_track_num2 == null) {
		  $dhl_text2 = '';
		  $dhl_track2 = '';
		 }else{
		  $dhl_text2 = 'DHL(2): ';
		  $dhl_track_num2_noblanks = str_replace(' ', '', $dhl_track_num2);
		  $dhl_link2 = 'http://track.dhl-usa.com/atrknav.asp?ShipmentNumber=' . $dhl_track_num2_noblanks . '&action=track&language=english&cntry_code=us';
		  $dhl_track2 = '<a target="_blank" href="' . $dhl_link2 . '">' . $dhl_track_num2 . '</a>' . "\n";
		}

		$email = 'Dear ' . $check_status['customers_name'] . ',' . "\n\n" . STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . (int)$oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "'>" .  'order_id=' . (int)$oID . "</a>\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_TRACKING_NUMBER . "\n" . $usps_text . $usps_track . $usps_text2 . $usps_track2 . $ups_text . $ups_track . $ups_text2 . $ups_track2 . $fedex_text . $fedex_track . $fedex_text2 . $fedex_track2 . $dhl_text . $dhl_track . $dhl_text2 . $dhl_track2 . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);
		tep_mail($check_status['customers_name'], $check_status['customers_email_address'], STORE_NAME . ' ' . EMAIL_TEXT_SUBJECT_1. (int)$oID . EMAIL_TEXT_SUBJECT_2 . $orders_status_array[$status], $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
		$customer_notified = '1';

 }else   if ($HTTP_POST_VARS['notify'] == 'on' & (tep_not_null($usps_track_num) & tep_not_null($usps_track_num2) & tep_not_null($ups_track_num) & tep_not_null($ups_track_num2) & tep_not_null($fedex_track_num) & tep_not_null($fedex_track_num2) & tep_not_null($dhl_track_num) & tep_not_null($dhl_track_num2) ) ) {
	  $notify_comments = '';
	  $usps_text = 'USPS(1): ';
	  $usps_track_num_noblanks = str_replace(' ', '', $usps_track_num);
	  $usps_link = 'http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=' . $usps_track_num_noblanks;
	  $usps_track = '<a target="_blank" href="' . $usps_link . '">' . $usps_track_num . '</a>' . "\n";
	  $usps_text2 = 'USPS(2): ';
	  $usps_track_num2_noblanks = str_replace(' ', '', $usps_track_num2);
	  $usps_link2 = 'http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=' . $usps_track_num2_noblanks;
	  $usps_track2 = '<a target="_blank" href="' . $usps_link2 . '">' . $usps_track_num2 . '</a>' . "\n";
	  $ups_text = 'UPS(1): ';
	  $ups_track_num_noblanks = str_replace(' ', '', $ups_track_num);
	  $ups_link = 'http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=' . $ups_track_num_noblanks . '&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&TypeOfInquiryNumber=T&UPS_HTML_Version=3.0&IATA=us&Lang=en&submit=Track+Package ';
	  $ups_track = '<a target="_blank" href="' . $ups_link . '">' . $ups_track_num . '</a>' . "\n";
	  $ups_text2 = 'UPS(2): ';
	  $ups_track_num2_noblanks = str_replace(' ', '', $ups_track_num2);
	  $ups_link2 = 'http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=' . $ups_track_num2_noblanks . '&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&TypeOfInquiryNumber=T&UPS_HTML_Version=3.0&IATA=us&Lang=en&submit=Track+Package ';
	  $ups_track2 = '<a target="_blank" href="' . $ups_link2 . '">' . $ups_track_num2 . '</a>' . "\n";
	  $fedex_text = 'Fedex(1): ';
	  $fedex_track_num_noblanks = str_replace(' ', '', $fedex_track_num);
	  $fedex_link = 'http://www.fedex.com/Tracking?tracknumbers=' . $fedex_track_num_noblanks . '&action=track&language=english&cntry_code=us';
	  $fedex_track = '<a target="_blank" href="' . $fedex_link . '">' . $fedex_track_num . '</a>' . "\n";
	  $fedex_text2 = 'Fedex(2): ';
	  $fedex_track_num2_noblanks = str_replace(' ', '', $fedex_track_num2);
	  $fedex_link2 = 'http://www.fedex.com/Tracking?tracknumbers=' . $fedex_track_num2_noblanks . '&action=track&language=english&cntry_code=us';
	  $fedex_track2 = '<a target="_blank" href="' . $fedex_link2 . '">' . $fedex_track_num2 . '</a>' . "\n";
	  $dhl_text = 'DHL(1): ';
	  $dhl_track_num_noblanks = str_replace(' ', '', $dhl_track_num);
	  $dhl_link = 'http://track.dhl-usa.com/atrknav.asp?ShipmentNumber=' . $dhl_track_num_noblanks . '&action=track&language=english&cntry_code=us';
	  $dhl_track = '<a target="_blank" href="' . $dhl_link . '">' . $dhl_track_num . '</a>' . "\n";
	  $dhl_text2 = 'DHL(2): ';
	  $dhl_track_num2_noblanks = str_replace(' ', '', $dhl_track_num2);
	  $dhl_link2 = 'http://track.dhl-usa.com/atrknav.asp?ShipmentNumber=' . $dhl_track_num2_noblanks . '&action=track&language=english&cntry_code=us';
	  $dhl_track2 = '<a target="_blank" href="' . $dhl_link2 . '">' . $dhl_track_num2 . '</a>' . "\n";
	  if ($HTTP_POST_VARS['notify_comments'] == 'on') {
		$notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n";
		if ($comments == null)
			$notify_comments = '';
					}

		$email = 'Dear ' . $check_status['customers_name'] . ',' . "\n\n" . STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . (int)$oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "'>" .  'order_id=' . (int)$oID . "</a>\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_TRACKING_NUMBER . "\n" . $usps_text . $usps_track . $usps_text2 . $usps_track2 . $ups_text . $ups_track . $ups_text2 . $ups_track2 . $fedex_text . $fedex_track . $fedex_text2 . $fedex_track2 . $dhl_text . $dhl_track . $dhl_text2 . $dhl_track2 . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);
		tep_mail($check_status['customers_name'], $check_status['customers_email_address'], STORE_NAME . ' ' . EMAIL_TEXT_SUBJECT_1 . (int)$oID . EMAIL_TEXT_SUBJECT_2 . $orders_status_array[$status], $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
		$customer_notified = '1';
	 }
//Package Tracking Plus END

	  tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments)  . "')");

	  $order_updated = true;
	}


	  tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments)  . "')");

	  $order_updated = true;
	}
//Package Tracking Plus BEGIN
	tep_db_query("update " . TABLE_ORDERS . " set usps_track_num = '" . tep_db_input($usps_track_num) . "' where orders_id = '" . tep_db_input($oID) . "'");
	tep_db_query("update " . TABLE_ORDERS . " set usps_track_num2 = '" . tep_db_input($usps_track_num2) . "' where orders_id = '" . tep_db_input($oID) . "'");
	tep_db_query("update " . TABLE_ORDERS . " set ups_track_num = '" . tep_db_input($ups_track_num) . "' where orders_id = '" . tep_db_input($oID) . "'");
	tep_db_query("update " . TABLE_ORDERS . " set ups_track_num2 = '" . tep_db_input($ups_track_num2) . "' where orders_id = '" . tep_db_input($oID) . "'");
	tep_db_query("update " . TABLE_ORDERS . " set fedex_track_num = '" . tep_db_input($fedex_track_num) . "' where orders_id = '" . tep_db_input($oID) . "'");
	tep_db_query("update " . TABLE_ORDERS . " set fedex_track_num2 = '" . tep_db_input($fedex_track_num2) . "' where orders_id = '" . tep_db_input($oID) . "'");
	tep_db_query("update " . TABLE_ORDERS . " set dhl_track_num = '" . tep_db_input($dhl_track_num) . "' where orders_id = '" . tep_db_input($oID) . "'");
	tep_db_query("update " . TABLE_ORDERS . " set dhl_track_num2 = '" . tep_db_input($dhl_track_num2) . "' where orders_id = '" . tep_db_input($oID) . "'");
	$order_updated = true;
//Package Tracking Plus END
	if ($order_updated == true) {
	 $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
	} else {
	  $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');
	}

	tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit'));
	break;
  case 'deleteconfirm':
	$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);

	tep_remove_order($oID, $HTTP_POST_VARS['restock']);

	tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action'))));
	break;
}
 }

 if (($action == 'edit') && isset($HTTP_GET_VARS['oID'])) {
$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);

$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");
$order_exists = true;
if (!tep_db_num_rows($orders_query)) {
  $order_exists = false;
  $messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error');
}
 }

 include(DIR_WS_CLASSES . 'order.php');
?>

Link to comment
Share on other sites

Most likely, your last "}" needs to be moved because it is conflicting with other addons you have installed. I don't know where you need to move it to, you'll have to play around with placement and test your store.

 

Scott

Link to comment
Share on other sites

  • 3 weeks later...

Scott (or anybody who knows :)),

I'm thinking about installing this great contribution, but before I'd like to ask if you know if your contribution will work with Google Checkout for osCommerce contribution or other Google Checkout contribution (that's another problem, I don't know which one to choose having PayPal IPN contribution installed), because I want to install Google Checkout also.

 

Thanks

Computers777dotcom

Link to comment
Share on other sites

Scott (or anybody who knows :) ),

I'm thinking about installing this great contribution, but before I'd like to ask if you know if your contribution will work with Google Checkout for osCommerce contribution or other Google Checkout contribution (that's another problem, I don't know which one to choose having PayPal IPN contribution installed), because I want to install Google Checkout also.

 

Thanks

 

It should work with Google Checkout, but I have not tested it personally. It works independent of most payment solutions, with the exception of Paypal - the changes made to checkout_process.php must be integrated into the paypal ipn in order for the order email to send properly. If a payment solution overrides the default oscommerce order email (like paypal does), then you'd have to modify that payment solution's file(s) as well.

 

I personally use the old osCommerce Official Paypal IPN addon version 1.4 because I like things simple that just work. However, I too wanted both Paypal and Google Checkout and couldn't figure out a way to integrate both into the checkout process at that time. This may be possible now, but I haven't checked. I wanted them both as options on the checkout_payment.php page without having buttons throughout the whole store and such...

 

Scott

Edited by olsonsp4c
Link to comment
Share on other sites

Hello everyone. I followed the instructions EXACTLY to install this contrib. Now when I log into my Admin panel and go to "Orders", I am receiving the following error:

 

Parse error: syntax error, unexpected T_CASE in /home/kitchens/public_html/admin/orders.php on line 286

 

I'm sure you figured this out, but the below code is the issue. You copied the tep_db_query into the code, which was only there so you'd know where to insert it. So you double the queries. And you get the extra "}" which caused the "unexpected T_CASE".

 

//Package Tracking Plus END

	   tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments)  . "')");

	   $order_updated = true;
	 }


	   tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments)  . "')");

	   $order_updated = true;
	 }

 

 

should be:

 

 

 //Package Tracking Plus END

	   tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments)  . "')");

		$order_updated = true;
	  }

 

 

Scott

Edited by olsonsp4c
Link to comment
Share on other sites

  • 2 weeks later...
When I put a closing bracket, before case 'deleteconfirm'; that did the trick it should look like this:

 

 
	tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit'));
	break;
}
  case 'deleteconfirm':
	$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);

	tep_remove_order($oID, $HTTP_POST_VARS['restock']);

	tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action'))));
	break;
}
 }

 

Thank you VERY much Kloienyc for your post on how you fixed this issue. I had a similar issue. There was a start bracket "{" missing in one of the else statements in the contrib. code higher up. Below is where I found the missing bracket. Hope this helps if anyone else is missing this as well.

 

}else//This is where the missing "{" goes//  if ($HTTP_POST_VARS['notify'] == 'on' & (tep_not_null($usps_track_num) & tep_not_null($usps_track_num2) & tep_not_null($ups_track_num) & tep_not_null($ups_track_num2) & tep_not_null($fedex_track_num) & tep_not_null($fedex_track_num2) & tep_not_null($dhl_track_num) & tep_not_null($dhl_track_num2) ) ) {
	  $notify_comments = '';
	  $usps_text = 'USPS(1): ';
	  $usps_track_num_noblanks = str_replace(' ', '', $usps_track_num);
	  $usps_link = 'http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=' . $usps_track_num_noblanks;
	  $usps_track = '<a target="_blank" href="' . $usps_link . '">' . $usps_track_num . '</a>' . "\n";
	  $usps_text2 = 'USPS(2): ';
	  $usps_track_num2_noblanks = str_replace(' ', '', $usps_track_num2);
	  $usps_link2 = 'http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=' . $usps_track_num2_noblanks;
	  $usps_track2 = '<a target="_blank" href="' . $usps_link2 . '">' . $usps_track_num2 . '</a>' . "\n";
	  $ups_text = 'UPS(1): ';
	  $ups_track_num_noblanks = str_replace(' ', '', $ups_track_num);
	  $ups_link = 'http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=' . $ups_track_num_noblanks . '&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&TypeOfInquiryNumber=T&UPS_HTML_Version=3.0&IATA=us&Lang=en&submit=Track+Package ';
	  $ups_track = '<a target="_blank" href="' . $ups_link . '">' . $ups_track_num . '</a>' . "\n";
	  $ups_text2 = 'UPS(2): ';
	  $ups_track_num2_noblanks = str_replace(' ', '', $ups_track_num2);
	  $ups_link2 = 'http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=' . $ups_track_num2_noblanks . '&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&TypeOfInquiryNumber=T&UPS_HTML_Version=3.0&IATA=us&Lang=en&submit=Track+Package ';
	  $ups_track2 = '<a target="_blank" href="' . $ups_link2 . '">' . $ups_track_num2 . '</a>' . "\n";
	  $fedex_text = 'Fedex(1): ';
	  $fedex_track_num_noblanks = str_replace(' ', '', $fedex_track_num);
	  $fedex_link = 'http://www.fedex.com/Tracking?tracknumbers=' . $fedex_track_num_noblanks . '&action=track&language=english&cntry_code=us';
	  $fedex_track = '<a target="_blank" href="' . $fedex_link . '">' . $fedex_track_num . '</a>' . "\n";
	  $fedex_text2 = 'Fedex(2): ';
	  $fedex_track_num2_noblanks = str_replace(' ', '', $fedex_track_num2);
	  $fedex_link2 = 'http://www.fedex.com/Tracking?tracknumbers=' . $fedex_track_num2_noblanks . '&action=track&language=english&cntry_code=us';
	  $fedex_track2 = '<a target="_blank" href="' . $fedex_link2 . '">' . $fedex_track_num2 . '</a>' . "\n";
	  $dhl_text = 'DHL(1): ';
	  $dhl_track_num_noblanks = str_replace(' ', '', $dhl_track_num);
	  $dhl_link = 'http://track.dhl-usa.com/atrknav.asp?ShipmentNumber=' . $dhl_track_num_noblanks . '&action=track&language=english&cntry_code=us';
	  $dhl_track = '<a target="_blank" href="' . $dhl_link . '">' . $dhl_track_num . '</a>' . "\n";
	  $dhl_text2 = 'DHL(2): ';
	  $dhl_track_num2_noblanks = str_replace(' ', '', $dhl_track_num2);
	  $dhl_link2 = 'http://track.dhl-usa.com/atrknav.asp?ShipmentNumber=' . $dhl_track_num2_noblanks . '&action=track&language=english&cntry_code=us';
	  $dhl_track2 = '<a target="_blank" href="' . $dhl_link2 . '">' . $dhl_track_num2 . '</a>' . "\n";
	  if ($HTTP_POST_VARS['notify_comments'] == 'on') {
		$notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n";
		if ($comments == null)
			$notify_comments = '';
					}

Thanks again!

Edited by Drafus
Link to comment
Share on other sites

It should work with Google Checkout, but I have not tested it personally. It works independent of most payment solutions, with the exception of Paypal - the changes made to checkout_process.php must be integrated into the paypal ipn in order for the order email to send properly. If a payment solution overrides the default oscommerce order email (like paypal does), then you'd have to modify that payment solution's file(s) as well.

 

I personally use the old osCommerce Official Paypal IPN addon version 1.4 because I like things simple that just work. However, I too wanted both Paypal and Google Checkout and couldn't figure out a way to integrate both into the checkout process at that time. This may be possible now, but I haven't checked. I wanted them both as options on the checkout_payment.php page without having buttons throughout the whole store and such...

 

Scott

 

Thanks for reply!

Computers777dotcom

Link to comment
Share on other sites

  • 3 weeks later...

I get this error in :Fatal error: Cannot redeclare tep_draw_textbox_field() (previously declared in /catalog/admin/includes/functions/html_output.php:272) in catalog/admin/includes/functions/html_output.php on line 372

 

 

right when you add this code in:

 

* STEP 8 *
**********

OPEN catalog/admin/includes/functions/html_output.php

FIND this:

////
// Output a form textarea field
 function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   if ( ($reinsert_value == true) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
     if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
       $field .= tep_output_string_protected(stripslashes($HTTP_GET_VARS[$name]));
     } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
       $field .= tep_output_string_protected(stripslashes($HTTP_POST_VARS[$name]));
     }
   } elseif (tep_not_null($text)) {
     $field .= tep_output_string_protected($text);
   }

   $field .= '</textarea>';

   return $field;
 }

ADD this AFTER:

//Package Tracking Plus BEGIN
////
// Output a form textbox field
 function tep_draw_textbox_field($name, $size, $numchar, $value = '', $params = '', $reinsert_value = true) {
   $field = '<input type="text" name="' . $name . '" size="' . $size . '" maxlength="' . $numchar . '" value="';
   if ($params) $field .= '' . $params;
   $field .= '';
   if ( ($GLOBALS[$name]) && ($reinsert_value) ) {
     $field .= $GLOBALS[$name];
 } elseif ($value != '') {
     $field .= trim($value);
   } else {
     $field .= trim($GLOBALS[$name]);
   }
   $field .= '">';

   return $field;
 }
//Package Tracking Plus END

 

 

 

and here is how I put it in:

///
// Output a form textarea field
 function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   if ( ($reinsert_value == true) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
     if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
       $field .= tep_output_string_protected(stripslashes($HTTP_GET_VARS[$name]));
     } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
       $field .= tep_output_string_protected(stripslashes($HTTP_POST_VARS[$name]));
     }
   } elseif (tep_not_null($text)) {
     $field .= tep_output_string_protected($text);
   }

   $field .= '</textarea>';

   return $field;
 }
  //Package Tracking Plus BEGIN
////
// Output a form textbox field
 function tep_draw_textbox_field($name, $size, $numchar, $value = '', $params = '', $reinsert_value = true) {
   $field = '<input type="text" name="' . $name . '" size="' . $size . '" maxlength="' . $numchar . '" value="';
   if ($params) $field .= '' . $params;
   $field .= '';
   if ( ($GLOBALS[$name]) && ($reinsert_value) ) {
     $field .= $GLOBALS[$name];
 } elseif ($value != '') {
     $field .= trim($value);
   } else {
     $field .= trim($GLOBALS[$name]);
   }
   $field .= '">';

   return $field;
 }
//Package Tracking Plus END

////
// Output a form hidden field
 function tep_draw_hidden_field($name, $value = '', $parameters = '') {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<input type="hidden" name="' . tep_output_string($name) . '"';

   if (tep_not_null($value)) {
     $field .= ' value="' . tep_output_string($value) . '"';
   } elseif ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) {
     if ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) ) {
       $field .= ' value="' . tep_output_string(stripslashes($HTTP_GET_VARS[$name])) . '"';
     } elseif ( (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) {
       $field .= ' value="' . tep_output_string(stripslashes($HTTP_POST_VARS[$name])) . '"';
     }
   }

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   return $field;
 }

////
// Hide form elements
 function tep_hide_session_id() {
   $string = '';

   if (defined('SID') && tep_not_null(SID)) {
     $string = tep_draw_hidden_field(tep_session_name(), tep_session_id());
   }

   return $string;
 }

////
// Output a form pull down menu
 function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<select name="' . tep_output_string($name) . '"';

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   if (empty($default) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
     if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
       $default = stripslashes($HTTP_GET_VARS[$name]);
     } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
       $default = stripslashes($HTTP_POST_VARS[$name]);
     }
   }

   for ($i=0, $n=sizeof($values); $i<$n; $i++) {
     $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
     if ($default == $values[$i]['id']) {
       $field .= ' SELECTED';
     }

     $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
   }
   $field .= '</select>';

   if ($required == true) $field .= TEXT_FIELD_REQUIRED;

   return $field;
 }
 function tep_draw_textbox_field($name, $size, $numchar, $value = '', $params = '', $reinsert_value = true) {
   $field = '<input type="text" name="' . $name . '" size="' . $size . '" maxlength="' . $numchar . '" value="';
   if ($params) $field .= '' . $params;
   $field .= '';
   if ( ($HTTP_POST_VARS[$name]) && ($reinsert_value) ) {
     $field .= $HTTP_POST_VARS[$name];
 } elseif ($value != '') {
     $field .= trim($value);
   } else {
     $field .= trim($HTTP_POST_VARS[$name]);
   }
   $field .= '">';

   return $field;
 }
?>

 

 

so how do I fix this scott?

Link to comment
Share on other sites

  • 1 month later...
It should work with Google Checkout, but I have not tested it personally. It works independent of most payment solutions, with the exception of Paypal - the changes made to checkout_process.php must be integrated into the paypal ipn in order for the order email to send properly. If a payment solution overrides the default oscommerce order email (like paypal does), then you'd have to modify that payment solution's file(s) as well.

 

I personally use the old osCommerce Official Paypal IPN addon version 1.4 because I like things simple that just work. However, I too wanted both Paypal and Google Checkout and couldn't figure out a way to integrate both into the checkout process at that time. This may be possible now, but I haven't checked. I wanted them both as options on the checkout_payment.php page without having buttons throughout the whole store and such...

 

Scott

 

 

Hi.

 

I was installing this great contribution I noticed that on step 5 you have to edit some lines that are already edited by google checkout. The above quote is the only article in this thread that I found mentions google checkout but it does not actually gives a solution.

 

has anyone figured out what would be the correct code to edit so that this can work with the edits made for google checkout. Iam now familiar with code so can not figure it out.

 

thanks in advanced.

tom

Link to comment
Share on other sites

  • 2 weeks later...

First.

 

Thanks Scott, this is an awesome contribution!! Directions are very clear and detailed. I took my time and worked though this not missing any steps.

 

Didnt work on the first try for me but worked on the second try.

 

The first time around I had an extra } in admin orders

 

            }
         }
######## Points/Rewards Module V2.00 EOF ##################

         }  <-------------TAKE THIS OUT THIS IS CAUSING YOUR ISSUE

         tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments)  . "')");

         $order_updated = true;
       }
//Package Tracking Plus BEGIN

 

 

Anyways just wanted to say that to help other people looking for a solution to

 

Parse error: syntax error, unexpected T_CASE in orders.php

 

 

Also Works fine with paypal orders, (I didnt do any of the paypal module stuff) just followed the main basic instructions

Also google checkout is a NON issue since the orders are not sent back to my website. (I have to view them on the google checkout website)

 

Thanks again Scott.

Edited by chriswest
Link to comment
Share on other sites

ok so I eventually had issues with paypal.

 

Subject line of orders with paypal read "EMAIL_TEXT_SUBJECT"

 

 

So i just went into catalog/includes/languages/english/checkout_process.php

 

and changed //define('EMAIL_TEXT_SUBJECT', 'Order Process');

to define('EMAIL_TEXT_SUBJECT', 'Order Process');

 

(took out comments) not sure if there is any bad side effect of this but dont see any yet and my subject line is back for paypal orders and still showing up for credit card orders.

Link to comment
Share on other sites

  • 2 weeks later...
I get this error in :Fatal error: Cannot redeclare tep_draw_textbox_field() (previously declared in /catalog/admin/includes/functions/html_output.php:272) in catalog/admin/includes/functions/html_output.php on line 372

 

 

right when you add this code in:

 

* STEP 8 *
**********

OPEN catalog/admin/includes/functions/html_output.php

FIND this:

////
// Output a form textarea field
 function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   if ( ($reinsert_value == true) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
     if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
       $field .= tep_output_string_protected(stripslashes($HTTP_GET_VARS[$name]));
     } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
       $field .= tep_output_string_protected(stripslashes($HTTP_POST_VARS[$name]));
     }
   } elseif (tep_not_null($text)) {
     $field .= tep_output_string_protected($text);
   }

   $field .= '</textarea>';

   return $field;
 }

ADD this AFTER:

//Package Tracking Plus BEGIN
////
// Output a form textbox field
 function tep_draw_textbox_field($name, $size, $numchar, $value = '', $params = '', $reinsert_value = true) {
   $field = '<input type="text" name="' . $name . '" size="' . $size . '" maxlength="' . $numchar . '" value="';
   if ($params) $field .= '' . $params;
   $field .= '';
   if ( ($GLOBALS[$name]) && ($reinsert_value) ) {
     $field .= $GLOBALS[$name];
 } elseif ($value != '') {
     $field .= trim($value);
   } else {
     $field .= trim($GLOBALS[$name]);
   }
   $field .= '">';

   return $field;
 }
//Package Tracking Plus END

 

 

 

and here is how I put it in:

///
// Output a form textarea field
 function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   if ( ($reinsert_value == true) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
     if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
       $field .= tep_output_string_protected(stripslashes($HTTP_GET_VARS[$name]));
     } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
       $field .= tep_output_string_protected(stripslashes($HTTP_POST_VARS[$name]));
     }
   } elseif (tep_not_null($text)) {
     $field .= tep_output_string_protected($text);
   }

   $field .= '</textarea>';

   return $field;
 }
  //Package Tracking Plus BEGIN
////
// Output a form textbox field
 function tep_draw_textbox_field($name, $size, $numchar, $value = '', $params = '', $reinsert_value = true) {
   $field = '<input type="text" name="' . $name . '" size="' . $size . '" maxlength="' . $numchar . '" value="';
   if ($params) $field .= '' . $params;
   $field .= '';
   if ( ($GLOBALS[$name]) && ($reinsert_value) ) {
     $field .= $GLOBALS[$name];
 } elseif ($value != '') {
     $field .= trim($value);
   } else {
     $field .= trim($GLOBALS[$name]);
   }
   $field .= '">';

   return $field;
 }
//Package Tracking Plus END

////
// Output a form hidden field
 function tep_draw_hidden_field($name, $value = '', $parameters = '') {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<input type="hidden" name="' . tep_output_string($name) . '"';

   if (tep_not_null($value)) {
     $field .= ' value="' . tep_output_string($value) . '"';
   } elseif ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) {
     if ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) ) {
       $field .= ' value="' . tep_output_string(stripslashes($HTTP_GET_VARS[$name])) . '"';
     } elseif ( (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) {
       $field .= ' value="' . tep_output_string(stripslashes($HTTP_POST_VARS[$name])) . '"';
     }
   }

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   return $field;
 }

////
// Hide form elements
 function tep_hide_session_id() {
   $string = '';

   if (defined('SID') && tep_not_null(SID)) {
     $string = tep_draw_hidden_field(tep_session_name(), tep_session_id());
   }

   return $string;
 }

////
// Output a form pull down menu
 function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<select name="' . tep_output_string($name) . '"';

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   if (empty($default) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
     if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
       $default = stripslashes($HTTP_GET_VARS[$name]);
     } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
       $default = stripslashes($HTTP_POST_VARS[$name]);
     }
   }

   for ($i=0, $n=sizeof($values); $i<$n; $i++) {
     $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
     if ($default == $values[$i]['id']) {
       $field .= ' SELECTED';
     }

     $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
   }
   $field .= '</select>';

   if ($required == true) $field .= TEXT_FIELD_REQUIRED;

   return $field;
 }
 function tep_draw_textbox_field($name, $size, $numchar, $value = '', $params = '', $reinsert_value = true) {
   $field = '<input type="text" name="' . $name . '" size="' . $size . '" maxlength="' . $numchar . '" value="';
   if ($params) $field .= '' . $params;
   $field .= '';
   if ( ($HTTP_POST_VARS[$name]) && ($reinsert_value) ) {
     $field .= $HTTP_POST_VARS[$name];
 } elseif ($value != '') {
     $field .= trim($value);
   } else {
     $field .= trim($HTTP_POST_VARS[$name]);
   }
   $field .= '">';

   return $field;
 }
?>

 

 

so how do I fix this scott?

 

I'm sorry everybody, I'm not getting emails when people post here... feel free to message me if I don't respond quickly.

 

Look at the bottom of the second code block:

 

function tep_draw_textbox_field($name, $size, $numchar, $value = '', $params = '', $reinsert_value = true) {
$field = '<input type="text" name="' . $name . '" size="' . $size . '" maxlength="' . $numchar . '" value="';
if ($params) $field .= '' . $params;
$field .= '';
if ( ($HTTP_POST_VARS[$name]) && ($reinsert_value) ) {
  $field .= $HTTP_POST_VARS[$name];
 } elseif ($value != '') {
  $field .= trim($value);
} else {
  $field .= trim($HTTP_POST_VARS[$name]);
}
$field .= '">';

return $field;
 }

 

Apparently another addon had you install a function with the same name. You can fix it by renaming the function for Package Tracking Plus (maybe to tep_draw_textbox_field_ptp - so you can differentiate the two functions) and going back through the code you inserted to edit every instance that Package Tracking Plus calls the function to the new name (your rename).

 

Scott

Link to comment
Share on other sites

ok so I eventually had issues with paypal.

 

Subject line of orders with paypal read "EMAIL_TEXT_SUBJECT"

 

 

So i just went into catalog/includes/languages/english/checkout_process.php

 

and changed //define('EMAIL_TEXT_SUBJECT', 'Order Process');

to define('EMAIL_TEXT_SUBJECT', 'Order Process');

 

(took out comments) not sure if there is any bad side effect of this but dont see any yet and my subject line is back for paypal orders and still showing up for credit card orders.

 

 

Great! Thanks for posting!

 

Scott

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...