Jump to content
olsonsp4c

Package Tracking with Email Notification Mods

Recommended Posts

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.

 

I will need more information than this as I know nothing about the Buysafe mod. It may not have to do with my contrib because you could update the status of an order with stock code. My guess is that there is a conflict with the Buysafe module and stock osC code for updating an order (since I just borrowed their code and "enhanced" it with the extra tracking boxes, the stock osC status update code was not modded). So, it should more than likely be posted under either the Buysafe contrib support or General support.

 

thanks!

 

Scott

Share this post


Link to post
Share on other sites

So far so good

 

 

 

1. I keep getting this on checkout

 

Order Number: 2195

Detailed Invoice: order_id=0 (the order always shows 0)

Date Ordered: Sunday 16 December, 2007

 

Products

 

Where do I look for the error. Its just not passing the order to the new order email. Works fine in admin on order updates.

 

Thanks

Share this post


Link to post
Share on other sites

I just took the FEDEX code and pasted it into the USPS location, then I replaced all the FedEx with USPS

 

Works Fine now. Im not even sure what (if anything change) but works great.

 

I just wish it would not send an email with

 

Order Number: 2205

Detailed Invoice: order_id=2205

Date Ordered: Monday 17 December, 2007

 

I wish is looked like this

 

Order Number: 2205

Date Ordered: Monday 17 December, 2007

 

 

or something similar...

 

I feel the order_id=2205 looks sloppy, but, heck, it works fine.

Share this post


Link to post
Share on other sites
I figured this out so now every evening I have a cron job set up that connects to the usps api servers and checks the delivery status for all orders. If order has been delivered it updates order status and order history tables. This saves me alot of time because I got tired of doing it manually all the time.

 

 

Can you or anyone else tell me how to set up a cron job to a usps_delivered.php ?

Share this post


Link to post
Share on other sites

OK,

 

I figured out some issues - to have the proper order number show up in the order email:

 

catalog/checkout_process.php should look like this:

  $email_order = EMAIL_TEXT_GREETING . "\n" .
			 EMAIL_SEPARATOR . "\n" .
			 STORE_NAME . EMAIL_INVOICE . "\n" .
			 EMAIL_SEPARATOR . "\n" . 
			 EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
//Tracking contribution begin
			 EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL') . "'>" .  'order_id=' . $insert_id . "</a>\n" .
//Tracking contribution end

 

paypal_ipn.php should look like this:

	  $email_order = EMAIL_TEXT_GREETING . "\n" .
				 EMAIL_SEPARATOR . "\n" .
				 STORE_NAME . EMAIL_INVOICE . "\n" . 
				 EMAIL_SEPARATOR . "\n" .
				 EMAIL_TEXT_ORDER_NUMBER . ' ' . $order_id . "\n" .
//Tracking contribution begin
				 EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $order_id, 'SSL') . "'>" .  'order_id=' . $order_id . "</a>\n" .
//Tracking contribution end

 

For the requested "Order Number: 2202":

  $email_order = EMAIL_TEXT_GREETING . "\n" .
			 EMAIL_SEPARATOR . "\n" .
			 STORE_NAME . EMAIL_INVOICE . "\n" .
			 EMAIL_SEPARATOR . "\n" . 
//Tracking contribution begin
			 EMAIL_TEXT_ORDER_NUMBER . ' ' . "<a HREF='" . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, $insert_id, 'SSL') . "'>" . $insert_id . "</a>\n" .
//Tracking contribution end

 

To fix the "<br>" that shows up after USPS tracking number only - catalog/admin/orders.php it should look like this (removed the "\n" after "noblanks") - same edit for Order Editor Contribution catalog/admin/edit_orders.php:

			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;
		  $usps_track = '<a target="_blank" href="' . $usps_link . '">' . $usps_track_num . '</a>' . "\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;
	  $usps_track = '<a target="_blank" href="' . $usps_link . '">' . $usps_track_num . '</a>' . "\n";

 

I think this updates this for RC1 - I have it fully functional in every aspect in RC1 on my website...

 

Let me know of other bugs.

 

Scott

Share this post


Link to post
Share on other sites

Does this think even work on the latest RC1 not supporting php 5?...........Honestly I ran into a tep_draw_textarea_field undedefined problem to a file in /admin/file_manager.php on line 164.......and there is nothing in the instruction that even come close to editing that file.

 

Any suggestions?........I really dont think I skipped a step but its possible as I have read in this forum a few times now.

 

Thanks,

Tim

Share this post


Link to post
Share on other sites
Does this think even work on the latest RC1 not supporting php 5?...........Honestly I ran into a tep_draw_textarea_field undedefined problem to a file in /admin/file_manager.php on line 164.......and there is nothing in the instruction that even come close to editing that file.

 

Any suggestions?........I really dont think I skipped a step but its possible as I have read in this forum a few times now.

 

Thanks,

Tim

 

this error doesn't make sense to me - having file manager is a security risk, I deleted the file altogether and removed all references to it in the admin.

Share this post


Link to post
Share on other sites

And I did not run the sql as of yet........I hope this does not effect anything..I planned to run it for the last step..since I do not have access to the database yet.

 

Thanks,

Tim

Share this post


Link to post
Share on other sites
And I did not run the sql as of yet........I hope this does not effect anything..I planned to run it for the last step..since I do not have access to the database yet.

 

Thanks,

Tim

 

The SQL makes it possible to store tracking numbers and is a necessary step.

Share this post


Link to post
Share on other sites
The SQL makes it possible to store tracking numbers and is a necessary step.

 

Thanks for your response olsonsp4c.......what your are trying to say is you do have this running on the latest build of osc although the author say it is was not tested on it?

 

I dont know what I ran into the error and as soon as I took the /admin/includes/functions/html_output and the /admin/orders.php out everything started to work again with no problem. How is this?

 

Thanks,

Tim

Share this post


Link to post
Share on other sites
Thanks for your response olsonsp4c.......what your are trying to say is you do have this running on the latest build of osc although the author say it is was not tested on it?

 

I dont know what I ran into the error and as soon as I took the /admin/includes/functions/html_output and the /admin/orders.php out everything started to work again with no problem. How is this?

 

Thanks,

Tim

 

I am the author and i do have it running properly on RC1; however, I have not tested it on a default install - my install is heavily modded with 80+ contributions...

Share this post


Link to post
Share on other sites

I was about to install this mod when I noticed that there are two folders in the package:

1. mods

2. stock install

 

Do I have to install the items form both folders or does it depend if you have a fresh install if you use (stock install)?


Site is underconstruction I am always looking for good advice on how to improve my site fill free to comment.

Thanks! ATise

Share this post


Link to post
Share on other sites
I was about to install this mod when I noticed that there are two folders in the package:

1. mods

2. stock install

 

Do I have to install the items form both folders or does it depend if you have a fresh install if you use (stock install)?

 

Stock install is only for the MS2 not RC1 - it's a copy over existing files... don't do this - do the edits manually.

 

the mods folder is referred to throughout the instructions, just read them carefully and you should be ok.

 

Scott

Share this post


Link to post
Share on other sites
I am the author and i do have it running properly on RC1; however, I have not tested it on a default install - my install is heavily modded with 80+ contributions...

 

Yes, I have alot of contributions also :D and yea maybe its because you dont have file manager.php on your admin is why you cant replicate this error or provide insight? It seemed like a very great contribution, we just have to iron out a few things. Well actually you becuase I dont know how to code php :lol:

 

Thanks man,

Tim

Share this post


Link to post
Share on other sites
Yes, I have alot of contributions also :D and yea maybe its because you dont have file manager.php on your admin is why you cant replicate this error or provide insight? It seemed like a very great contribution, we just have to iron out a few things. Well actually you becuase I dont know how to code php :lol:

 

Thanks man,

Tim

 

I will try to work on it at some point - i did have file_manager.php until last week when I learned of the security risk of having it and my contribution worked fine and I got no errors, so it would be hard to duplicate. were there any other contributions that you installed simultaneously with mine?

Share this post


Link to post
Share on other sites
Stock install is only for the MS2 not RC1 - it's a copy over existing files... don't do this - do the edits manually.

 

the mods folder is referred to throughout the instructions, just read them carefully and you should be ok.

 

Scott

 

Thanks Scott Installed and works!


Site is underconstruction I am always looking for good advice on how to improve my site fill free to comment.

Thanks! ATise

Share this post


Link to post
Share on other sites
I am the author and i do have it running properly on RC1; however, I have not tested it on a default install - my install is heavily modded with 80+ contributions...

 

Ok thanks,

 

Any recommendations for my store? It is modded in some way actually also. And I could not get this to work. Also, what about people who do have the file_manager.php? how can you answer why is it calling to this? Thanks for everything man.

 

Thanks again,

Tim

Share this post


Link to post
Share on other sites
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

 

I take it, then, that in your installation when you say that the contrib will list multiple tracking numbers, it will list ONLY one tracking number per shipping carrier per order. It will list multiple tracking numbers, but only one tracking number per shipping carrier and multiple numbers only if multiple separate carriers (only one tracking number per carrier allowed)?

 

When you enter a new tracking number for a previously used carrier, it will simply overwrite that former enry wit the new? I assume that this is so since you have only one field for each carrier for a tracking number in the order table.

 

Wouldn't you need a separate table referenced by order ID to add multiple shipments through the same carrier?

 

Just asking for clarification.

 

Regards,

 

Martin

Share this post


Link to post
Share on other sites
I take it, then, that in your installation when you say that the contrib will list multiple tracking numbers, it will list ONLY one tracking number per shipping carrier per order. It will list multiple tracking numbers, but only one tracking number per shipping carrier and multiple numbers only if multiple separate carriers (only one tracking number per carrier allowed)?

 

When you enter a new tracking number for a previously used carrier, it will simply overwrite that former enry wit the new? I assume that this is so since you have only one field for each carrier for a tracking number in the order table.

 

Wouldn't you need a separate table referenced by order ID to add multiple shipments through the same carrier?

 

Just asking for clarification.

 

Regards,

 

Martin

 

Yes, correct on all counts... I am going to be working on an update to allow up to 3 tracking numbers per carrier; however, it will mean a bunch of new inserts into the orders table. thanks for writing!

 

Scott

Share this post


Link to post
Share on other sites
Yes, correct on all counts... I am going to be working on an update to allow up to 3 tracking numbers per carrier; however, it will mean a bunch of new inserts into the orders table. thanks for writing!

 

Scott

 

Scott,

 

Why don't you just mimick the comments_table and its operation, instead with Carrier/Tracking-Number.

 

Seems like it would be easy enough to do. Why bother to populate the order table with more fields. With its own table, you'd have the ability to add an unlimited number of shipments by various carriers per order. Of course, I don't know who might need that capability when one shipment per order is the norm and, no doubt, overwhelmingly common occurrence.

 

It seems to me that it is much more likely that someone would use the same carrier for multiple shipments within the same order, rather than separate carriers. So the ability to have different carriers for one order looks good - but lacks practicality.

 

Martin

Edited by imagixx

Share this post


Link to post
Share on other sites
Scott,

 

Why don't you just mimick the comments_table and its operation, instead with Carrier/Tracking-Number.

 

Seems like it would be easy enough to do. Why bother to populate the order table with more fields. With its own table, you'd have the ability to add an unlimited number of shipments by various carriers per order. Of course, I don't know who might need that capability when one shipment per order is the norm and, no doubt, overwhelmingly common occurrence.

 

It seems to me that it is much more likely that someone would use the same carrier for multiple shipments within the same order, rather than separate carriers. So the ability to have different carriers for one order looks good - but lacks practicality.

 

Martin

 

This is a good idea and I appreciate the input. I will be looking into this over the coming weeks. I'm thinking that you mean having a table purely for tracking where the tracking numbers are stored and then linked back to the order number and have a separate place where the tracking number could then be clicked to track it in the admin...

 

This doesn't sound challenging upfront, but would require substantial reworking of the contribution, but it could be worth it! I've been thinking about reworking the contribution to allow real-time tracking within the customer's account history info too... since we're talking mods...

 

Should you mod this on your own before I get around to it, could you post the mods here or email me the mods?

 

Scott

Edited by olsonsp4c

Share this post


Link to post
Share on other sites

Very well done for your hard work. Nice contribution.

 

With me, the contribution installed ok in catalog. However, in admin, while everything seem ok the four track buttons that are supposed to be next to the four related textarea don't show up. The button (button_tracker.gif) is loaded to admin/inc/lang/eng/images/button.

 

When I looked at the code in admin/order.php, I only saw the code that creates the taxtaera :

<td class="main"><b><a href="<?php echo $ups_track_link; ?>" target="_blank"><?php echo TABLE_HEADING_UPS_TRACKING; ?></a></b>  <?php echo tep_draw_textbox_field('ups_track_num', '40', '40', '', $order->info['ups_track_num']);

 

There is no code for the button, eg

//echo tep_image_submit('button_tracker.gif', IMAGE_BUTTON_UPSTRACK, 'align=middle');

 

Or have I got it wrong?

 

Help will be well appreciated. Thanks

Share this post


Link to post
Share on other sites
Very well done for your hard work. Nice contribution.

 

With me, the contribution installed ok in catalog. However, in admin, while everything seem ok the four track buttons that are supposed to be next to the four related textarea don't show up. The button (button_tracker.gif) is loaded to admin/inc/lang/eng/images/button.

 

When I looked at the code in admin/order.php, I only saw the code that creates the taxtaera :

<td class="main"><b><a href="<?php echo $ups_track_link; ?>" target="_blank"><?php echo TABLE_HEADING_UPS_TRACKING; ?></a></b>  <?php echo tep_draw_textbox_field('ups_track_num', '40', '40', '', $order->info['ups_track_num']);

 

There is no code for the button, eg

//echo tep_image_submit('button_tracker.gif', IMAGE_BUTTON_UPSTRACK, 'align=middle');

 

Or have I got it wrong?

 

Help will be well appreciated. Thanks

 

Never mind. I have found the answer.

There was a dir included in the mod "Tracking Buttons Mod" which addressed my problem.

I applied the mod and it worked.

 

Thanks.

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

×