Jump to content
olsonsp4c

Package Tracking with Email Notification Mods

Recommended Posts

Hi,

 

I used the instructions. I verfied all the files and found a missing code on /includes/classes/order.php:

 

//Tracking contribution begin
					  'ups_track_num' => $order['ups_track_num'],
					  'usps_track_num' => $order['usps_track_num'],
					  'fedex_track_num' => $order['fedex_track_num'],
					  'fedex_freight_track_num' => $order['fedex_freight_track_num'],
					  'dhl_track_num' => $order['dhl_track_num'],
//Tracking contribution end

 

This fixed the order history page. It now shows the hyperlinked tracking numbers.

 

I created a new order as a customer, created a new tracking number on the admin order page and updated, and the comments did duplicate again.

 

Hi Scott,

 

I figured out the duplication problem from my admin/orders.php page. They were duplicated codes on that page. Thanks for your help!!


Onnig

Share this post


Link to post
Share on other sites
Hi Scott,

 

I figured out the duplication problem from my admin/orders.php page. They were duplicated codes on that page. Thanks for your help!!

 

You are certainly welcome :)

 

Scott

Share this post


Link to post
Share on other sites

Hi. This is a cool contrib - I hope my question (or suggestion) has not already been discussed.

 

I use osC with the Multi-Vendor Shipping contrib, with the Order Editor for MVS. I have installed your tracking contrib and it works good... except with the order editor for mvs contrib, which I have not setup yet.

 

Is there any way to be able to send order updates with multiple tracking numbers for one carrier rather than just one number per carrier? Maybe be able to add number,number,number rather than just number, and have it send seperate links for each tracking number?

 

Thanks.

Share this post


Link to post
Share on other sites

I saw this asked before but no one responded (that I know of).

 

Does anyone have instrcutions for use with edit orders contribution?

 

Great contribution!! Would love to get it to work with edit orders contributions and HTML emails!

Edited by EthosPaul

Paul ------------

Share this post


Link to post
Share on other sites
I saw this asked before but no one responded (that I know of).

 

Does anyone have instrcutions for use with edit orders contribution?

 

Great contribution!! Would love to get it to work with edit orders contributions and HTML emails!

 

The instructions for integrating it with Order Editor are included in the package. It doesn't work with the latest version of order Editor, but works with version 2.9.4.

 

There is also a mod that creates links that are clickable with HTML on. That is the part I'm having trouble with now. It creates the links, but the order Id is Always =0 so the link is useless.

 

Anyone have it working correctly with that mod installed?


Currently running 76 contibutions.

Share this post


Link to post
Share on other sites
OK, im getting the same problem that Avail1now was having. Its deleting orders with the update button.

 

I think this is related to Avails fix to the "deleteconfirm" error where thay placed a closing bracked before the statement.

 

I had to put in the bracket to get past that error, now it deletes orders.

 

Im thinking that bracket needs to be elsewhere as it closes whatever before the deleteconform, and selects it as THE case and deletes the order.

 

Does this sound like im on track? Maybe even?

 

Any help would appreciated.

 

Thanks.

 

 

I am having this problem to, when I enter a tracking number then hit enter. The order gets deleted.

 

I have order editor installed and when I use this page instead to update/add a trcking number it works fine.

 

I also ran into the delete_confirm problem so I removed break; and added a closing bracket to get it to move on.

 

Any help with this is appreciated.


Sincerely

Mike

Share this post


Link to post
Share on other sites

Forgive me if this has already been answered. I googled it and found no help. I installed everything and it works a-ok! However, I need to track more than one UPS number. I tried separating the numbers with a comma or just a space, but it bungles the UPS url.

 

 

Thanks in advance for any help!

Share this post


Link to post
Share on other sites

I am having a weird problem with this contribution. Order emails go out fine with proper formatting using "n\".

 

BUT...when I go to update the status of an order and it sends an email to the customer, the formatting of the email is with no line breaks at all and it actually shows up like this:

 

...................................Order Number: 81489Detailed Invoice: https://store.com/account_history_info.php?...er_id=81489Date Ordered: Monday 06 August, 2007Thank you for shopping at store.com. Your order has been updated to the following status: ShippedIf necessary, you may check the status of your order directly by following the link above and login to your account. If you have further questions or comments, please reply to this email or contact us via our contact page at http://www.store.com/contact.php.Again, we would like to take the time to thank you for shopping at store.com.Sincerely,Customer Service Department

Share this post


Link to post
Share on other sites

Hello,

 

I hope someone can help, as the mod seems fantastic for us......

 

We installed the mods and followed all instructions. After installed we ran a test order and the following happened:

 

We receive the order confirmation email but the order never updated in the admin > orders list (admin/orders.php).

 

We can update old orders and we receive the email with tracking links perfectly, but new orders do not post? Any suggestions is appreciated.

 

thx,

 

ejs

Share this post


Link to post
Share on other sites

I am getting this error:Parse error: parse error, unexpected T_DOUBLE_ARROW in /home/content/k/u/s/kustomjs/html/catalog/includes/classes/order.php on line 68

 

here is the code:

'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title'])));

//Tracking contribution begin

'ups_track_num' => $order['ups_track_num'], <---- here is the error i am getting

'usps_track_num' => $order['usps_track_num'],

'fedex_track_num' => $order['fedex_track_num'],

'fedex_freight_track_num' => $order['fedex_freight_track_num'],

'dhl_track_num' => $order['dhl_track_num'],

//Tracking contribution end

Share this post


Link to post
Share on other sites
I am getting this error:Parse error: parse error, unexpected T_DOUBLE_ARROW in /home/content/k/u/s/kustomjs/html/catalog/includes/classes/order.php on line 68

 

here is the code:

'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title'])));

//Tracking contribution begin

'ups_track_num' => $order['ups_track_num'], <---- here is the error i am getting

'usps_track_num' => $order['usps_track_num'],

'fedex_track_num' => $order['fedex_track_num'],

'fedex_freight_track_num' => $order['fedex_freight_track_num'],

'dhl_track_num' => $order['dhl_track_num'],

//Tracking contribution end

 

The problem is that the code was inserted in the wrong place - it should be before 'shipping_method' to work (ie. the note on the instructions).

 

Scott

Edited by olsonsp4c

Share this post


Link to post
Share on other sites
now I get this error message:html/catalog/account_history_info.php on line 542

 

I'm sorry, no error is mentioned and I don't know what line 252 of your code is.

 

Scott

Share this post


Link to post
Share on other sites
Hi. This is a cool contrib - I hope my question (or suggestion) has not already been discussed.

 

I use osC with the Multi-Vendor Shipping contrib, with the Order Editor for MVS. I have installed your tracking contrib and it works good... except with the order editor for mvs contrib, which I have not setup yet.

 

Is there any way to be able to send order updates with multiple tracking numbers for one carrier rather than just one number per carrier? Maybe be able to add number,number,number rather than just number, and have it send seperate links for each tracking number?

 

Thanks.

 

Not at this point, I'd love this to be the case, but I don't know how to code it :)

 

thanks.

 

Scott

Share this post


Link to post
Share on other sites
The instructions for integrating it with Order Editor are included in the package. It doesn't work with the latest version of order Editor, but works with version 2.9.4.

 

There is also a mod that creates links that are clickable with HTML on. That is the part I'm having trouble with now. It creates the links, but the order Id is Always =0 so the link is useless.

 

Anyone have it working correctly with that mod installed?

 

I noticed this as well when I wrote the code... a value isn't being passed properly and I'm unsure how to fix it. I haven't fixed it because the link takes you to the account login page anyways and the customer can see their invoice once they login... If you have a fix, please message me.

 

Scott

Share this post


Link to post
Share on other sites
Forgive me if this has already been answered. I googled it and found no help. I installed everything and it works a-ok! However, I need to track more than one UPS number. I tried separating the numbers with a comma or just a space, but it bungles the UPS url.

Thanks in advance for any help!

 

I would love to have the contrib take multiple numbers; however, I don't know how to make this work at this point. Any help would be appreciated :)

 

Scott

Share this post


Link to post
Share on other sites
Has any one considered making this mod that much better by merging the Canada Post Tracking in?

http://forums.oscommerce.com/index.php?showtopic=170312

That would be super if some one did. :)

 

I will look into this.

 

Scott

Share this post


Link to post
Share on other sites
I am having this problem to, when I enter a tracking number then hit enter. The order gets deleted.

 

I have order editor installed and when I use this page instead to update/add a trcking number it works fine.

 

I also ran into the delete_confirm problem so I removed break; and added a closing bracket to get it to move on.

 

Any help with this is appreciated.

 

The problem was solved I believe... it was a problem with brackets caused by other contributions that had been added, so, best to play around with it a bit :)

 

Scott

Share this post


Link to post
Share on other sites
Does anyone know about this problem above????

 

For the formatting problem, check admin/orders.php - it should read as follows:

 

//Tracking contribution begin
	  $customer_notified = '0';
	  if ($HTTP_POST_VARS['notify'] == 'on' & ($ups_track_num == '' & $fedex_track_num == '' & $usps_track_num == '' & $fedex_freight_track_num == '' & $dhl_track_num == '' ) ) {
		$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 . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\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' & ($ups_track_num == '' or $fedex_track_num == '' or $usps_track_num == '' or $fedex_freight_track_num == '' or $dhl_track_num == '' ) ) {
		$notify_comments = '';
		if ($HTTP_POST_VARS['notify_comments'] == 'on') {
		  $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n";
		  if ($comments == null)
			$notify_comments = '';
		}
		if ($ups_track_num == null) {
		  $ups_text = '';
		 }else{
		  $ups_text = 'UPS: ';
		  $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 ' . "\n";
		}
		if ($usps_track_num == null) {
		  $usps_text = '';
		 }else{
		  $usps_text = 'USPS: ';
		  $usps_track_num_noblanks = str_replace(' ', '', $usps_track_num);
		  $usps_link = 'http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=' . $usps_track_num_noblanks . "\n";
		} 
		if ($fedex_track_num == null) {
		  $fedex_text = '';
		 }else{
		  $fedex_text = 'Fedex: ';
		  $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' . "\n";
		}
		if ($fedex_freight_track_num == null) {
		  $fedex_freight_text = '';
		 }else{
		  $fedex_freight_text = 'FedEx Freight: ';
		  $fedex_freight_track_num_noblanks = str_replace(' ', '', $fedex_freight_track_num);
		  $fedex_freight_link = 'http://www.fedex.com/Tracking?tracknumbers=' . $fedex_freight_track_num_noblanks . '&action=track&language=english&cntry_code=us' . "\n";
		}
		if ($dhl_track_num == null) {
		  $dhl_text = '';
		 }else{
		  $dhl_text = 'DHL: ';
		  $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' . "\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 . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n\n" . EMAIL_TEXT_TRACKING_NUMBER . "\n" . $usps_text . $usps_link . $ups_text . $ups_link . $fedex_text . $fedex_link . $fedex_freight_text . $fedex_freight_link . $dhl_text . $dhl_link . "\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($ups_track_num) & tep_not_null($fedex_track_num) & tep_not_null($usps_track_num) & tep_not_null($fedex_freight_track_num) & tep_not_null($dhl_track_num) ) ) {
		$notify_comments = '';
		$ups_text = 'UPS: ';
		$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 ' . "\n";
		$usps_text = 'USPS: ';
		$usps_track_num_noblanks = str_replace(' ', '', $usps_track_num);
		$usps_link = 'http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=' . $usps_track_num_noblanks . "\n";
		$fedex_text = 'Fedex: ';
		$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' . "\n";
		$fedex_freight_text = 'FedEx Freight: ';
		$fedex_freight_track_num_noblanks = str_replace(' ', '', $fedex_freight_track_num);
		$fedex_freight_link = 'http://www.fedex.com/Tracking?tracknumbers=' . $fedex_freight_track_num_noblanks . '&action=track&language=english&cntry_code=us' . "\n";
		$dhl_text = 'DHL: ';
		$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' . "\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 . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n\n" . EMAIL_TEXT_TRACKING_NUMBER . "\n" . $usps_text . $usps_link . $ups_text . $ups_link . $fedex_text . $fedex_link . $fedex_freight_text . $fedex_freight_link . $dhl_text . $dhl_link . "\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';
	  }
//Tracking contribution end

 

Scott

Share this post


Link to post
Share on other sites
Hello,

 

I hope someone can help, as the mod seems fantastic for us......

 

We installed the mods and followed all instructions. After installed we ran a test order and the following happened:

 

We receive the order confirmation email but the order never updated in the admin > orders list (admin/orders.php).

 

We can update old orders and we receive the email with tracking links perfectly, but new orders do not post? Any suggestions is appreciated.

 

thx,

 

ejs

 

The problem was in Step 5 - please check the below changes in admin/orders.php:

 

------------
***Step 5***
------------

***If you are using the Order Editor Contribution, you may alternately use the alternate "Step 5" for integrating this step into Order Editor.  This mod is in the "mods" folder.***

catalog/admin/orders.php

Find this:

	$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);

And put this below it:

//Tracking contribution begin
	$ups_track_num = tep_db_prepare_input($HTTP_POST_VARS['ups_track_num']);
	$usps_track_num = tep_db_prepare_input($HTTP_POST_VARS['usps_track_num']);
	$fedex_track_num = tep_db_prepare_input($HTTP_POST_VARS['fedex_track_num']);
	$fedex_freight_track_num = tep_db_prepare_input($HTTP_POST_VARS['fedex_freight_track_num']);
	$dhl_track_num = tep_db_prepare_input($HTTP_POST_VARS['dhl_track_num']);
//Tracking contribution end


Find this:

	$check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");

And replace with this:

//Tracking contribution begin
	$check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, fedex_track_num, ups_track_num, usps_track_num, fedex_freight_track_num, dhl_track_num, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");
//Tracking contribution end


***Note: the only change was the addition of fedex_track_num, ups_track_num, usps_track_num, fedex_freight_track_num, dhl_track_num, to the query.

 

However, my guess is that the following is missing in this Step:

 

Find this:

	  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;
	}

And place this below it:

//Tracking contribution begin
	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 usps_track_num = '" . tep_db_input($usps_track_num) . "' 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_freight_track_num = '" . tep_db_input($fedex_freight_track_num) . "' 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) . "'");
	$order_updated = true;
//Tracking contribution end

 

Scott

Share this post


Link to post
Share on other sites

To everybody,

 

For some reason, this bulletin board quit sending me notifications when somebody posts for help, so I've been completely unaware of the issues. I deeply apologize. Also, I've not tested my contrib for RC1. I, myself, have updated our store to RC1 and haven't had problems thus far; however, it remains to be seen if it will still work. I'm short on time nowadays, so any help to streamline of mod this contrib would be appreciated.

 

Scott

Share this post


Link to post
Share on other sites
To everybody,

 

For some reason, this bulletin board quit sending me notifications when somebody posts for help, so I've been completely unaware of the issues. I deeply apologize. Also, I've not tested my contrib for RC1. I, myself, have updated our store to RC1 and haven't had problems thus far; however, it remains to be seen if it will still work. I'm short on time nowadays, so any help to streamline of mod this contrib would be appreciated.

 

Scott

 

I've just experience a new problem

I'm implemented Buysafe module.

And the 1st order I received with buysafe, when i try to update the order with new status it automatically takes me to the store login page.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×