X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Parcel Tracking for your Customers (https://forum.x-cart.com/showthread.php?t=53115)

Dan.roh 04-04-2010 03:52 AM

Parcel Tracking for your Customers
 
Hi Guys,

This is something I would like to share, not sure if there is something like this already on the forum but here goes...

This mod will allow your customers to track their parcels online from your site, I use CityLink as my courier but you might need to change the code to suit your courier.

I should have really placed the code into a tpl. file but instead I just created an static page as this would do me just fine.

The code can be used in any way that suits you or placed anywhere on your site. I have placed mine under "order history" on my storefront. If this is what you want then do the following:

**You would need to use your own images or feel free to copy mine**
**The code is a bit messy but feel free to change**

1. Create a language variable - lbl_parcel_tracking and place Parcel tracking in it.

2. Create a static page in you admin side (call it Parcel Tracking) and place the following code in it

Quote:

<p style="color: rgb(166, 0, 18);"><span class="ParcelTracking" style="font-size: 14pt;">CityLink Parcel Tracking</span></p>
<p><span class="ParcelTracking" style="font-size: 14pt;"></span>Use your unique customer order number (e.g. WO00000) in the form
below to track the current progress of your order.</p>
<p> This will open in a new page so please ensure you have any
pop-up blockers turned off, thank you.</p>
<div class="TrackOrderBoxWrapper">
<div class="TrackOrderBoxTop">
<img height="9" width="9" src="http://www.your site.co.uk/skin1/images/spacer.gif" alt="" /></div>
<div class="TrackOrderBoxMiddle">
<form action="http://www.city-link.com/track_parcel/track_parcel.php" name="track" id="track" method="get" target="_blank">
<table cellspacing="0" cellpadding="0" border="0" width="340">
<tbody>
<tr>
<td width="100"><span style="font-weight: bold;">Order Number:</span></td>
<td width="162">
<input type="text" name="custref" class="SearchField" value="" />
<input type="hidden" name="hidebanners" value="1" />
</td>
<td width="53">
<input type="image" src="http://www.your site.co.uk/skin1/images/track_search.jpg" alt="Search" /></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<div class="ParcelTracking">
<img height="9" width="9" src="http://www.your site.co.uk/skin1/images/spacer.gif" alt="" />
<div class="TrackOrderVan">
<img height="150" width="200" src="http://www.your site.co.uk/skin1/images/city_link_van.jpg" alt="City Link Order Tracking" /></div>
</div>


3. Open /customer/menu_cart.tpl and place the following between two If statements where you want it to appear to call your code

Quote:

<a href="http://www.your site.co.uk/pages.php?pageid=50">{$lng.lbl_parcel_tracking}</a>
{if $user_subscription ne ""}


The results can be seen here

http://www.customoid.co.uk/pages.php?pageid=50



Hope someone find this useful

PhilJ 04-04-2010 05:33 AM

Re: Parcel Tracking for your Customers
 
Nice, I did some thing similar yesterday, supporting Royal Mail, Parcelforce, Citylink, USPS and Canada Post... :)
http://www.xcartmods.co.uk/snippet-handy-parcel-tracking-mod.html
http://www.xcartmods.co.uk/images/D/track.jpg

Dan.roh 04-04-2010 05:46 AM

Re: Parcel Tracking for your Customers
 
Thanks, but you should have posted it yesterday...lol - that way I would not have wasted half of my day, could have just copied yours... :D

Quote:

Originally Posted by PhilJ
Nice, I did some thing simliar yesterday, supporting Royal Mail, Parcelforce, Citylink, USPS and Canada Post... :)
http://www.xcartmods.co.uk/snippet-handy-parcel-tracking-mod.html


gizmo 04-05-2010 09:35 AM

Re: Parcel Tracking for your Customers
 
Quote:

Originally Posted by PhilJ
Nice, I did some thing similar yesterday, supporting Royal Mail, Parcelforce, Citylink, USPS and Canada Post... :)
http://www.xcartmods.co.uk/snippet-handy-parcel-tracking-mod.html



Very handy indeed, Dan Are you using phils now? lol.....

Dan.roh 04-05-2010 10:50 AM

Re: Parcel Tracking for your Customers
 
Phils mod is much more advanced I would say, but all I really needed was for it to work with CityLink. When I do upgrade my shipping options in the near future I will definitely upgrade to Philâ–“s mod!

By the way, great mod Phil! Just found it too late or shall I say you posted it too late...lol :lol:

Quote:

Originally Posted by gizmo
Very handy indeed, Dan Are you using phils now? lol.....


Sparks 04-05-2010 03:18 PM

Re: Parcel Tracking for your Customers
 
Nice work on both accounts. Does it handle things like spaces all well and good etc?

Dan.roh 04-05-2010 08:34 PM

Re: Parcel Tracking for your Customers
 
Not sure what you mean with spaces? When a customer types in a tracking number that is incorrect the courier's website will notify them that the tracking number is not valid. Nothing much you can do there as this will be different from every courier company's website. Some courier websites only take lower case tracking numbers so the customer will just have to type it the way it is or copy and paste it for that matter

Quote:

Originally Posted by Sparks
Nice work on both accounts. Does it handle things like spaces all well and good etc?


isaels@i-artsupplies.co.u 06-17-2010 12:35 AM

Re: Parcel Tracking for your Customers
 
I have got this to come up in the customer email. But its not displaying properly nor is it when I put it in the customer home tpl.

I cant get an example up but is only dispays the drop down box with the shipping companies in it. Ther is no option to enter the tracking number.

Like I said this happens in the site too.

Any Ideas?

Dan.roh 06-17-2010 02:43 AM

Re: Parcel Tracking for your Customers
 
Which one are you using? Mine or Phil's?


Quote:

Originally Posted by isaels@i-artsupplies.co.u
I have got this to come up in the customer email. But its not displaying properly nor is it when I put it in the customer home tpl.

I cant get an example up but is only dispays the drop down box with the shipping companies in it. Ther is no option to enter the tracking number.

Like I said this happens in the site too.

Any Ideas?


Tony Pearce 06-17-2010 09:06 AM

Re: Parcel Tracking for your Customers
 
In my version of 4.1.12 you need this bottom line:

{include file="menu.tpl" menu_title="Parcel Tracking" menu_content=$smarty.capture.menu}

notice:

menu_

works great for me!

Thanks very much

isaels@i-artsupplies.co.u 07-02-2010 09:59 AM

Re: Parcel Tracking for your Customers
 
am using phils, sorry I forgot there were 2 on thread

kgoel 09-26-2010 09:30 PM

Re: Parcel Tracking for your Customers
 
Paul,

Did you solve the problem for 4.3.1 ?. If so, please post the changes that you have made. Thanks

isaels@i-artsupplies.co.u 09-27-2010 02:38 AM

Re: Parcel Tracking for your Customers
 
HI, no I gave up in the end, and just put some basic links within the text of the customer complete notificaition email. Would have prefered something a bit more fancy though.

Unfortunatly kept having the same problems though.
Thanks

floyd_2 10-18-2010 04:16 AM

Re: Parcel Tracking for your Customers
 
I implemented Phil's mod on my site in Australia for TNT, Hunter Express and Couriers Please. Great mod Phil, thanks. However, when it came to implementing it for Fastway Couriers there was a hitch :( The way Fastways construct their query URL is different to most others. Here's an example query URL:


where FA0017457708 is the Tracking Number.

The rest of the URL is static. The problem is that I can't get my head around how to create the URL using the form when the Arguments data has both a prefix (-A) and a suffix (,-N1,-AN).

I have assumed that the Tracking ID form input field data (the tracking number that the user types in) needs to be massaged prior to the form being submitted so that the prefix and suffix data is added to the tracking number - in this case changing it from

FA0017457708

to

-AFA0017457708,-N1,AN

I'm just wondering if anyone might have the expertise to assist with massaging the tracking number and modifying it as the form is being submitted.

Thanks in advance

Dean

Phoenixone 10-21-2010 06:55 AM

Re: Parcel Tracking for your Customers
 
Quote:

Originally Posted by floyd_2
I implemented Phil's mod on my site in Australia for TNT, Hunter Express and Couriers Please. Great mod Phil, thanks. However, when it came to implementing it for Fastway Couriers there was a hitch :( The way Fastways construct their query URL is different to most others. Here's an example query URL:



where FA0017457708 is the Tracking Number.

The rest of the URL is static. The problem is that I can't get my head around how to create the URL using the form when the Arguments data has both a prefix (-A) and a suffix (,-N1,-AN).

I have assumed that the Tracking ID form input field data (the tracking number that the user types in) needs to be massaged prior to the form being submitted so that the prefix and suffix data is added to the tracking number - in this case changing it from

FA0017457708

to

-AFA0017457708,-N1,AN

I'm just wondering if anyone might have the expertise to assist with massaging the tracking number and modifying it as the form is being submitted.

Thanks in advance

Dean


i used a iframe for mine
Code:

<iframe name=booking frameborder=0 width="100%" height="400px" src=http://www.supaswift.com/fx/Default.aspx?TabId=89&waybill={$order.tracking}></iframe>

so for yours i think this should work:

Code:

<iframe name=booking frameborder=0 width="100%" height="400px" src=http://www.fastway.com.au/Magic94Scripts/mgrqispi94.dll?appname=FW&prgname=PodResultNew&arg uments=-A{$order.tracking},-N1,-AN></iframe>

PhilJ 11-12-2010 06:47 AM

Re: Parcel Tracking for your Customers
 
TNT added if anyone's interested.

floyd_2 11-12-2010 07:18 AM

Re: Parcel Tracking for your Customers
 
Thanks everyone. I ended up assembling the string using javascript and it works a treat. Because the tracking form I'm using doesn't actually reference {$order.tracking} - it's on the sidebar - I had to assemble the string based on a customer input tracking number. The tracking box I'm using is form based and coded in javascript anyway. I just needed to add a function to do the string handling for me before the form was actually posted, and after the customer had entered their tracking number. I put a function into the java sidebar form app as follows:

Code:

<script type="text/javascript" language="JavaScript">
function ActionDeterminator()
{
  var prefix = "-A";
  var suffix = ",-N1";
  var track = document.myform.arguments.value;
  var fullstring = prefix + track + suffix;
  document.myform.arguments.value = fullstring;
  document.myform.action = 'http://www.fastway.com.au/Magic94scripts/mgrqispi94.dll';
  document.myform.method = 'post';
return true;
}


and altered the submit button code for Fastways to call the function as follows:

Code:

<input type="submit" name="Submit" value="Go" onClick="return ActionDeterminator();">

Dean

vitalaccessories 01-03-2011 03:20 PM

Re: Parcel Tracking for your Customers
 
Hi,

This is a really interesting thread. I am trying to come up with something that will allow customers to track their parcels progress using DHL or Interlink in the UK. Maybe it's feasible using an adaptation of the mods found here?

One other thing though, how are you giving the tracking information to customers in the first place? I would like to enter it when changing the order status to complete but can't see an option to enter free text that will be shown in the email sent to the customer when 'complete' is triggered. Just wondering how you guys transmit this info'...

Thanks.

Dan.roh 01-03-2011 08:30 PM

Re: Parcel Tracking for your Customers
 
There is a free mod that allows you to do this when complete is triggered. When I locate it I will post it for you

vitalaccessories 01-04-2011 08:40 AM

Re: Parcel Tracking for your Customers
 
Quote:

Originally Posted by Dan.roh
There is a free mod that allows you to do this when complete is triggered. When I locate it I will post it for you


That would be very appreciated, thanks. I am standing by...

Dan.roh 01-04-2011 09:15 AM

Re: Parcel Tracking for your Customers
 
1 Attachment(s)
There you go...:-)

http://www.bcsengineering.com/store/free-xcart-order_page-emailer.html

Above should give you the results underneath each order as displayed in my image below

vitalaccessories 01-04-2011 09:36 AM

Re: Parcel Tracking for your Customers
 
Quote:

Originally Posted by Dan.roh
There you go...:-)

http://www.bcsengineering.com/store/free-xcart-order_page-emailer.html

Above should give you the results underneath each order as displayed in my image below

Thank you very much, I will give this a go!

Regards,
Adam

isaels@i-artsupplies.co.u 01-05-2011 06:06 AM

Re: Parcel Tracking for your Customers
 
Quote:

how are you giving the tracking information to customers in the first place? I would like to enter it when changing the order status to complete but can't see an option to enter free text that will be shown in the email sent to the customer when 'complete' is triggered. Just wondering how you guys transmit this info'...

this is part of 4.3, I upgraded from 4.2 and this facility wasnt in it.

vitalaccessories 01-05-2011 09:10 AM

Re: Parcel Tracking for your Customers
 
Quote:

Originally Posted by isaels@i-artsupplies.co.u
this is part of 4.3, I upgraded from 4.2 and this facility wasnt in it.

Not part of 4.4.2 though... There is a function there to add customer notes visible to the customer, but these don't get sent over on the email when status changes. Instead they can be seen only on a receipt when you go to my account >> orders history, then pull up order number (it's in customer notes). Would far more beneficial to be shown on the email.

Maybe this is a bug...

vitalaccessories 01-07-2011 03:57 PM

Re: Parcel Tracking for your Customers
 
Quote:

Originally Posted by Dan.roh


As an update, installed the mod and it works great, thanks.

I notice the shipping service is not moved across though. Would there be any easy way to adjust the code so the shipping service used at checkout is automatically shown once a tracking ID is shown in the customers completion email?

Thanks again!

Vacman 01-13-2011 08:50 PM

Re: Parcel Tracking for your Customers
 
Quote:

Originally Posted by Dan.roh
There you go...:-)

http://www.bcsengineering.com/store/free-xcart-order_page-emailer.html

Above should give you the results underneath each order as displayed in my image below


Does this work with 4.3.2? I had it on my old xCart system and I do miss it sometimes.

thebluedoorboutique 01-15-2012 07:27 AM

Re: Parcel Tracking for your Customers
 
I would like to use something like this for 4.4.2 that allows UPS or USPS customers to track their orders; I guess USPS doesn't do reference numbers though. Could this mod (or another) look up the order, find the tracking ID and then track the package? That would be cool.

cflsystems 01-15-2012 09:16 AM

Re: Parcel Tracking for your Customers
 
One can be developed when customer provides orderid and some other info to identify unique order and customer. I have something similar with orderid and email and outputs order status from XC data with tracking number, further carrier tracking can be added as well. Contact me if interested


All times are GMT -8. The time now is 05:55 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.