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


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

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