Jump to content
olsonsp4c

Package Tracking with Email Notification Mods

Recommended Posts

I have this contribution installed and it works fine. The only problem is when a customer logs into their account_history_info.php, the tracking numbers are not there. Did I miss something?

 

Thanks, Rickey

Share this post


Link to post
Share on other sites
I have this contribution installed and it works fine. The only problem is when a customer logs into their account_history_info.php, the tracking numbers are not there. Did I miss something?

 

Thanks, Rickey

 

With the information that you've given me, I'd have to say that you did miss something; however, knowing what you missed is another question I can't answer...

 

My guess is that you missed at least one edit in account_history_info.php but it could be another file too...

 

Scott

Share this post


Link to post
Share on other sites
With the information that you've given me, I'd have to say that you did miss something; however, knowing what you missed is another question I can't answer...

 

My guess is that you missed at least one edit in account_history_info.php but it could be another file too...

 

Scott

 

Your're right, I did miss one edit. Got that fixed but I have another question. I have Ultimate HTML Email installed, I have everything working fine accept when I go to Admin to update an order for a customer. I change the order status from pending to processing and it sends the Ultimate HTML Email layout that I use. When I update the order to shipped and include the tracking number and send the update, it's in plain text. The shipping number is there and it is a link to track the package but I cant figure out how to change this email layout to use the Ultimate HTML Email.

 

Thanks, Rickey

Share this post


Link to post
Share on other sites
did you look under the Admin configuration options - Send HTML emails?

 

 

Yes sir, it works on all the emails accept when I update the order status to shipped and include a tracking number.

Share this post


Link to post
Share on other sites
Yes sir, it works on all the emails accept when I update the order status to shipped and include a tracking number.

 

OK. Well, honestly, I don't know. I'm sure it's a conflict with the other addon you mentioned which I don't use and haven't tested with my addon for compatability. You could email me your catalog/admin/orders.php file and I could attempt to look at it to see what hacks the other addon made that might conflict.

 

Scott

Share this post


Link to post
Share on other sites

Guys, everything so far is working fine with this contribution on the customer end. The only problem I'm having is, once a tracking # is entered in admin and updated, the text box isn't populated with the tracking number after a page reload. This makes it difficult to know whether a tracking number has been entered.

 

Please advise on where I might look to resolve this issue.

 

Thanks, Frank

Share this post


Link to post
Share on other sites
Guys, everything so far is working fine with this contribution on the customer end. The only problem I'm having is, once a tracking # is entered in admin and updated, the text box isn't populated with the tracking number after a page reload. This makes it difficult to know whether a tracking number has been entered.

 

Please advise on where I might look to resolve this issue.

 

Thanks, Frank

 

Frank, it is most likely in admin/orders.php or in admin/includes/classes/order.php - double check your edits in these two files...

 

Scott

Share this post


Link to post
Share on other sites
Frank, it is most likely in admin/orders.php or in admin/includes/classes/order.php - double check your edits in these two files...

 

Scott

 

Scott, this may be a dumb question, but is this designed to populate the text box in admin if a tracking number has been added? I've double and triple checked my code and it's all there. I'm confused at this point.

Share this post


Link to post
Share on other sites
Scott, this may be a dumb question, but is this designed to populate the text box in admin if a tracking number has been added? I've double and triple checked my code and it's all there. I'm confused at this point.

 

It is Frankc...

 

sorry I can't look at it right now, but I will post later today.

 

Scott

Share this post


Link to post
Share on other sites
Scott, this may be a dumb question, but is this designed to populate the text box in admin if a tracking number has been added? I've double and triple checked my code and it's all there. I'm confused at this point.

 

This is the code that populates the input boxes in admin/orders.php - look for "$order->info['xxxx_track_num'];" - it grabs the input from the db query:

 

<!-- Package Tracking Plus BEGIN -->
  <tr>
	<td><table border="0" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_USPS_TRACKING; ?></b></td>
		<td class="main"><?php echo tep_draw_textbox_field('usps_track_num', '40', '40', '', $order->info['usps_track_num']); ?></td>
		<td class="main"><a target="_blank" href="http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=<?php echo $order->info['usps_track_num']; ?>"><?php echo tep_image_button('button_track.gif', 'Track Package'); ?></a></td>
		<td class="main"><?php echo tep_draw_textbox_field('usps_track_num2', '40', '40', '', $order->info['usps_track_num2']); ?></td>
		<td class="main"><a target="_blank" href="http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=<?php echo $order->info['usps_track_num2']; ?>"><?php echo tep_image_button('button_track.gif', 'Track Package'); ?></a></td>
	  </tr>
	  <tr>
		<td colspan="5"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	  </tr>
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_UPS_TRACKING; ?></b></td>
		<td class="main"><?php echo tep_draw_textbox_field('ups_track_num', '40', '40', '', $order->info['ups_track_num']); ?></td>
		<td><a target="_blank" href="http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=<?php echo $order->info['ups_track_num']; ?>&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&TypeOfInquiryNumber=T&UPS_HTML_Version=3.0&IATA=us&Lang=en&submit=Track+Package"><?php echo tep_image_button('button_track.gif', 'Track Package'); ?></a></td>
		<td class="main"><?php echo tep_draw_textbox_field('ups_track_num2', '40', '40', '', $order->info['ups_track_num2']); ?></td>
		<td><a target="_blank" href="http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=<?php echo $order->info['ups_track_num2']; ?>&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&TypeOfInquiryNumber=T&UPS_HTML_Version=3.0&IATA=us&Lang=en&submit=Track+Package"><?php echo tep_image_button('button_track.gif', 'Track Package'); ?></a></td>
	  </tr>
	  <tr>
		<td colspan="5"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	  </tr>
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_FEDEX_TRACKING; ?></b></td>
		<td class="main"><?php echo tep_draw_textbox_field('fedex_track_num', '40', '40', '', $order->info['fedex_track_num']); ?></td>
		<td class="main"><a target="_blank" href="http://www.fedex.com/Tracking?tracknumbers=<?php echo $order->info['fedex_track_num']; ?>&action=track&language=english&cntry_code=us"><?php echo tep_image_button('button_track.gif', 'Track Package'); ?></a></td>
		<td class="main"><?php echo tep_draw_textbox_field('fedex_track_num2', '40', '40', '', $order->info['fedex_track_num2']); ?></td>
		<td class="main"><a target="_blank" href="http://www.fedex.com/Tracking?tracknumbers=<?php echo $order->info['fedex_track_num2']; ?>&action=track&language=english&cntry_code=us"><?php echo tep_image_button('button_track.gif', 'Track Package'); ?></a></td>
	  </tr>
	  <tr>
		<td colspan="5"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	  </tr>
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_DHL_TRACKING; ?></b></td>
		<td class="main"><?php echo tep_draw_textbox_field('dhl_track_num', '40', '40', '', $order->info['dhl_track_num']); ?></td>
		<td class="main"><a target="_blank" href="http://track.dhl-usa.com/atrknav.asp?ShipmentNumber=<?php echo $order->info['dhl_track_num']; ?>&action=track&language=english&cntry_code=us"><?php echo tep_image_button('button_track.gif', 'Track Package'); ?></a></td>
		<td class="main"><?php echo tep_draw_textbox_field('dhl_track_num2', '40', '40', '', $order->info['dhl_track_num2']); ?></td>
		<td class="main"><a target="_blank" href="http://track.dhl-usa.com/atrknav.asp?ShipmentNumber=<?php echo $order->info['dhl_track_num2']; ?>&action=track&language=english&cntry_code=us"><?php echo tep_image_button('button_track.gif', 'Track Package'); ?></a></td>
	  </tr>
	  <tr>
		<td colspan="5"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	  </tr>
	</table></td>
  </tr>
<!-- Package Tracking Plus END -->

 

if this code is correct then you are missing the db query in admin/includes/classes/order.php

 

	  $order_query = tep_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, usps_track_num, usps_track_num2, ups_track_num, ups_track_num2, fedex_track_num, fedex_track_num2, dhl_track_num, dhl_track_num2, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");

 

or this in the same file:

 

FIND this:

  $this->info = array('currency' => $order['currency'],
					  'currency_value' => $order['currency_value'],
					  'payment_method' => $order['payment_method'],
					  'cc_type' => $order['cc_type'],
					  'cc_owner' => $order['cc_owner'],
					  'cc_number' => $order['cc_number'],
					  'cc_expires' => $order['cc_expires'],
					  'date_purchased' => $order['date_purchased'],
					  'orders_status' => $order_status['orders_status_name'],
					  'last_modified' => $order['last_modified'],
					  'total' => strip_tags($order_total['text']),
					  'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title'])));

INSERT this ABOVE the last line:

//Package Tracking Plus BEGIN
					  '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'],
//Package Tracking Plus END

 

MAKE sure that EVERY line EXCEPT the last one ends with a "," (comma) while the LAST line ends with ");"

 

It would be safest to have your last line still be:

 

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

 

Scott

Share this post


Link to post
Share on other sites
Hello,

 

Unless you purposefully modified this file, it should look like this after the mod is pasted:

 

tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, Scott, thanks for the wonderful contrib, i am also getting this error, i tried the mod code you gave and the only thing it does is move the error line number down. Here is my error code...

Parse error: parse error in /home/www/cmprints.com/admin/orders.php on line 242

 

I am looking forward to using this, please help.

 

customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "')");

$order_updated = true;

}

 

if (tep_not_null($ups_track_num)) {

tep_db_query("update " . TABLE_ORDERS . " set ups_track_num = '" . tep_db_input($ups_track_num) . "' where orders_id = '" . tep_db_input($oID) . "'");

$order_updated = true;

}

 

if (tep_not_null($usps_track_num)) {

tep_db_query("update " . TABLE_ORDERS . " set usps_track_num = '" . tep_db_input($usps_track_num) . "' where orders_id = '" . tep_db_input($oID) . "'");

$order_updated = true;

}

 

if (tep_not_null($fedex_track_num)) {

tep_db_query("update " . TABLE_ORDERS . " set fedex_track_num = '" . tep_db_input($fedex_track_num) . "' where orders_id = '" . tep_db_input($oID) . "'");

$order_updated = true;

}

 

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;

}

}

 

hope this helps

scott

Share this post


Link to post
Share on other sites

I did install this contribution alon with package tracking plus but the two will not work together. The code from packing tracking I am referring to is below:

 

//Package Tracking Plus END

 

$check_status = tep_db_fetch_array($check_status_query);

 

if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) {

tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'");

 

/** $customer_notified = '0';

if (isset($HTTP_POST_VARS['notify']) && ($HTTP_POST_VARS['notify'] == 'on')) {

$notify_comments = '';

if (isset($HTTP_POST_VARS['notify_comments']) && ($HTTP_POST_VARS['notify_comments'] == 'on')) {

$notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n";

}

$email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);

tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

$customer_notified = '1';

} **/

 

//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 = '';

 

 

And the other mod requires this to be added - image of instruction lies below:

 

epis.jpg

 

So am looking for some ways this can be done.

 

Thanks.

Share this post


Link to post
Share on other sites

I have downloaded this add-on I have one question to start with. I'm using myphpadmin to upload the tracking.sql Either I am doing it wrong or placing it in the wrong place because I get a message back saying something about rows or colums being empty is this the way it should be?

Pat

Share this post


Link to post
Share on other sites

I got it all installed everything looks good from the admin side even though I have not tested it yet. But when I click on the tracking link from the customer side i get the http 404 file can not be found. Even though the files is placed in the languages/english folder. Anyone have any idea why I cant access this page. There is a lot of coding to re due to check it out.

Pat

Share this post


Link to post
Share on other sites

I found I missed uploading one of the tracking.php files. Now that it is uploaded when I click on tracking I get error messages refering to one of the orders.php. I had this code in the wrong place, //Package Tracking Plus BEGIN

'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'],

//Package Tracking Plus END

But when I put it in the correct place I still get error messages when clicking on the tracking link. If I dont click on the link I get two pages into the order process and then I get error messages. I remove the code completely and I can do an order but no tracking ability. Even the emails that are sent out do not include a TRacking link. Can anyone offer any suggestions? I have re-looked at the coding over and over with the instructions but still no luck.

Pat

Share this post


Link to post
Share on other sites

Does anyone have any input. All I did was copy and paste the coding in the instructions. I take it no one else can see the problem either. I guess I will just have to remove the script till the bugs are worked out of it

Pat

Share this post


Link to post
Share on other sites

Thanks for such a great contribution. I have installed it and everything is working fine except a small detail on the email that goes out to the customer upon purchase. On the line after "With warm regards from your friends at Custom Pilot Shirts" there is a separator and then the words "Custom Pilot Shirtstrue". Where did the "true" part come from? I need to eliminate that so that it only says "Custom Pilot Shirts".

Thanks,

Rob Campbell

CustomPilotShirts.com

Share this post


Link to post
Share on other sites

Excellent job on this contribution! Is it possible to add more then 3 tracking ID's per carrier with some simple customization or does this involve a complete rewrite of the code. My PHP and SQL skills are fair but I figured I'd ask before getting my hands wet. If possible, what are the key files to modify to add more tracking ID's

 

thanks

Share this post


Link to post
Share on other sites

Hi everyone,

 

I installed this module this morning and everything appears to be working properly. I do have one minor issue and I'm hoping someone here can help.

 

I installed the Package Tracking with Email Notification Mod along with the Order Editor 2.7.4

 

The order_editor.php page shows the UPS Tracking Number(s) properly.

But the orders.php shows TABLE_HEADING_UPS_TRACKING

 

I apologize if this is something simple. I've been using osCommerce for a while now but just recently started getting into the installation and configuration of modules.

 

FYI for the contributor - I thought the documentation was great and very easy to follow. Kudos.

Share this post


Link to post
Share on other sites

DISREGARD - I resolved my issue.

 

 

 

 

Hi everyone,

 

I installed this module this morning and everything appears to be working properly. I do have one minor issue and I'm hoping someone here can help.

 

I installed the Package Tracking with Email Notification Mod along with the Order Editor 2.7.4

 

The order_editor.php page shows the UPS Tracking Number(s) properly.

But the orders.php shows TABLE_HEADING_UPS_TRACKING

 

I apologize if this is something simple. I've been using osCommerce for a while now but just recently started getting into the installation and configuration of modules.

 

FYI for the contributor - I thought the documentation was great and very easy to follow. Kudos.

Share this post


Link to post
Share on other sites

hello, i have installed this MOD, hoping to make a few changes to suit my store

i am not looking to send details to customers as yet, but i do want to be able to store tracking details in admin orders page for reference.

i installed the mod skipping the parts i understand as the customer side. so far it all works beside the following

 

-in an order when i add the tracking number and click track it will pop up the tracking website without the number filled out.

-in an order when i add the tracking number and click update it dose not save the tracking number.

 

i hope some one can help with this problem. thank you!

Share this post


Link to post
Share on other sites

I am trying to install Package Tracking Plus V2.2. I have carefully followed all of the installation instructions for both Package Tracking Plus and Order Editor (seems to be a prerequsit). When I try to click on PACKAGE TRACKING the program advances through tracking.php to about line 37 <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>. It can't find column_left.php.

 

I am using osCommerce V2.3.1 updated to V2.3.3. Nowhere in the release is there a column_left.php file. How do I fix this?

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

×