Jump to content

source-code for trackingnumber


Recommended Posts

The funny thing is that if you add the Trackinnumber and then just click the button next to the Shipping statusmessage again it resends the Shipping e-mail inlcuding the Trackinnumber!

I’ve been trying to add another Order-status but I cannot get it to behave like the Shipping one.
To me it looks like there is something hardcoded in PS that “opens” the option to add the Trackingnumber once the Shipped status is set.

Is there anyone from the Team who can comment on that please?

Link to comment
Share on other sites

  • 8 months later...

Nope, the solution is to change some code in adminfolder/tabs/AdminOrders.php..

Change (on line 406)
if ($carrier->url AND $currentState->id == _PS_OS_SHIPPING_)

to

if ($carrier->url AND ($currentState->id == _PS_OS_PREPARATION_ || $currentState->id == _PS_OS_PAYMENT_ || $currentState->id == _PS_OS_SHIPPING_))

The tracking number field will be available once a customer has paid or when the order is in preparation. (Also in shipping status)
Enter tracking number THEN change status to shipping.. Tada!

Link to comment
Share on other sites

Nope, the solution is to change some code in adminfolder/tabs/AdminOrders.php..

Change (on line 406)
if ($carrier->url AND $currentState->id == _PS_OS_SHIPPING_)

to

if ($carrier->url AND ($currentState->id == _PS_OS_PREPARATION_ || $currentState->id == _PS_OS_PAYMENT_ || $currentState->id == _PS_OS_SHIPPING_))

The tracking number field will be available once a customer has paid or when the order is in preparation. (Also in shipping status)
Enter tracking number THEN change status to shipping.. Tada!


and if you are running Ver. 1.1.0.5, and don't require changing status to "preparation in progress", and wish to be able to place a tracking number in as soon as payment is accepted... replace above with:

if ($carrier->url AND ($currentState->id == _PS_OS_PAYMENT_ || $currentState->id == _PS_OS_SHIPPING_))

You will then see {image 1} a field to place tracking number as soon as payment is rec'd.

Then create an ORDER MESSAGE like:

<-- UPS MESSAGE -->
Here is your UPS Tracking Number.
wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=INSERT_TRACKING_HERE&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track

Thank you for shopping with (INSERT SHOP NAME).
<-- UPS MESSAGE -->

This is is useful for UPS tracking obviously. Change to preferred shipping method and incorporate the proper url into your ORDER MESSAGE.

To send the email with tracking number to customer, simply click NEW MESSAGE (while on their order) and use drop down to select desired template {image 2} (in this case UPS), {image 3} replace INSERT_TRACKING_HERE with your customers tracking number, click radio button that says SEND TO CUSTOMER, hit send and then YES to the popup. Your customer will now get an email with a tracking link and not just a url without a tracking number. This tracking message will also be available to customer at next login under messages.


{image 4} I have been unable (even with following some tuts) to send an email to customer with inserted tracking number by entering tracking number into the tracking number field, saving, then updating status to SHIPPING. Even when checking the input for sending email with said status via Order statuses (which I hope was changed in updates to proper spelling as I just noticed the sp error). The email simply has the url with no tracking numbers attached to it. This means that if you have shipping status send an email, they get something to the effect of "http://wwwapps.ups.com/etracking/tracking.cgi" not too useful heh? More aggravating for customers too. If there has been anyone who has achieved this desired outcome in Ver. 1.1.0.5, I welcome the news and would be your dear friend for life! There has to be an easier way to get a tracking number to customer in (1) step rather than the two I have described right?

I sure hope this helps somebody in the same boat, using same version as I am...

Jonathan

11642_n4c5gLxZYIpivBhCsrx8_t

11643_r9vLqIV6oiQjFq7aGGMT_t

11644_Tn58pzP5kDdVTzOML3Gb_t

11645_CuQy6Am2JJBvUlCG9aMG_t

Link to comment
Share on other sites

Don't use "New Message"
Set the template for "shipping" correct with your standard shipping message, with the code {followup} where u want the tracking-link.
Set the url in Carriers to "wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=@&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track" - Don't forget the @
And then set the tracking-id in the order + change to shipping - Finnish!

Link to comment
Share on other sites

Don't use "New Message"
Set the template for "shipping" correct with your standard shipping message, with the code {followup} where u want the tracking-link.
Set the url in Carriers to "wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=@&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track" - Don't forget the @
And then set the tracking-id in the order + change to shipping - Finnish!


Thank you Mikeey,

You are "THE MAN"!

I guess my research was incomplete, there must be another post that you explained this.

In my addition to the post above, the additional edit of your edit still stands for those using a CC Merchant or Google Checkout to see the input field for tracking number as soon as payment is recieved, as we completely bypass PREPARATION IN PROGRESS.

Thank's again Mikeey, tested and working as you said it would.

Jonathan
Link to comment
Share on other sites

  • 4 months later...
  • 1 year later...

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
×
×
  • Create New...