Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Ability to select shipping carrier for tracking numbers

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 09-25-2008, 08:02 PM
 
floyd_2 floyd_2 is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 69
 

Default Re: Ability to select shipping carrier for tracking numbers

If you're after the ability to get the TRACK IT! button working for Canada Post, would you mind posting a valid tracking number that I can use?

TIA

Dean
__________________
X-Cart Gold v4.1.8
Reply With Quote
  #22  
Old 09-25-2008, 08:42 PM
 
floyd_2 floyd_2 is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 69
 

Default Re: Ability to select shipping carrier for tracking numbers

Ok, I've worked the Canada Post "Track It" template code out. I grabbed a consignment ID from a friend in Canada to test with.

In your canada_post.tpl in modules/Order_Tracking you need the code to be as follows:

Code:
{* $Id: canada_post.tpl,v 1.0 2008/09/26 14:07:32 twice Exp $ *} <form name="basicPinForm" method="post" action="https://obc.canadapost.ca/emo/basicPin.do" method="post" target="_blank"> <input type="hidden" name="trackingId" value="{$order.tracking}"> <input type="hidden" name="referenceNumberPressed" value="false"> <input type="hidden" name="trackingCode" value="PIN"> <input type="hidden" name="language" value="null"> <input type="hidden" name="action" value="query"> <input type="hidden" name="fromPage" value="basicPin"> <input type="submit" value="{$lng.lbl_track_it|strip_tags:false|escape}" /> <br /> {$lng.txt_apost_redirection} </form>

Hope that helps guys. For the life of me, I can't remember what ties the tracking template to the shipping method though. It was a while ago when I set up my shipping methods and my goldfish-memory is true to form.

Does anyone know what template / php / screen ties shipping methods to tracking templates?

Dean
__________________
X-Cart Gold v4.1.8
Reply With Quote
  #23  
Old 09-25-2008, 10:04 PM
  imexhouse's Avatar 
imexhouse imexhouse is offline
 

eXpert
  
Join Date: May 2006
Location: Canada
Posts: 377
 

Default Re: Ability to select shipping carrier for tracking numbers

In skin1/main/history_order.tpl find:

Code:
{if $active_modules.Order_Tracking ne ""} {if $postal_service eq "UPS"} {include file="modules/Order_Tracking/ups.tpl"} {elseif $postal_service eq "USP"} {include file="modules/Order_Tracking/usps.tpl"} {elseif $postal_service eq "Fed"} {include file="modules/Order_Tracking/fedex.tpl"}

and change it to:

Code:
{if $active_modules.Order_Tracking ne ""} {if $postal_service eq "UPS"} {include file="modules/Order_Tracking/ups.tpl"} {elseif $postal_service eq "USP"} {include file="modules/Order_Tracking/usps.tpl"} {elseif $postal_service eq "Fed"} {include file="modules/Order_Tracking/fedex.tpl"} {elseif $postal_service eq "Can"} {include file="modules/Order_Tracking/canada_post.tpl"}

Thanks to floyd_2 for the tracking code!

One more thing, in skin1/modules/Order_Tracking/canada_post.tpl, change

Code:
{$lng.txt_apost_redirection}
to

Code:
{$lng.txt_cpc_redirection}
__________________
Jack@AquasanaCA
X-CART GOLD 4.0.19 Live
DSEFU, AOM, ezCheckout, ezUpsell, ezRecommends, RememberMe, RememberAnonCarts
AquasanaCanada.com - Aquasana╝ - #1 Rated Water Filters in America!
X-CART GOLD 4.4.5 Live
CDSEO Pro v. 1.8.4
AquasanaMontreal.com
Aquasana╝ & Rhino Water Filtration Systems
Reply With Quote
  #24  
Old 09-25-2008, 10:12 PM
 
floyd_2 floyd_2 is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 69
 

Default Re: Ability to select shipping carrier for tracking numbers

Thanks imexhouse - the memories came flooding back when I read your post. I will now be able to sleep peacefully tonight without continuing to wonder where that template was

Dean
__________________
X-Cart Gold v4.1.8
Reply With Quote
  #25  
Old 09-25-2008, 10:16 PM
  imexhouse's Avatar 
imexhouse imexhouse is offline
 

eXpert
  
Join Date: May 2006
Location: Canada
Posts: 377
 

Default Re: Ability to select shipping carrier for tracking numbers

You're welcome
__________________
Jack@AquasanaCA
X-CART GOLD 4.0.19 Live
DSEFU, AOM, ezCheckout, ezUpsell, ezRecommends, RememberMe, RememberAnonCarts
AquasanaCanada.com - Aquasana╝ - #1 Rated Water Filters in America!
X-CART GOLD 4.4.5 Live
CDSEO Pro v. 1.8.4
AquasanaMontreal.com
Aquasana╝ & Rhino Water Filtration Systems
Reply With Quote
  #26  
Old 09-25-2008, 10:20 PM
 
floyd_2 floyd_2 is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 69
 

Default Re: Ability to select shipping carrier for tracking numbers

Here's an even better way to interface with TNT Australia for your tracking needs:

HTML Code:
{* $Id: tnt.tpl,v 1.1 2008/09/26 14:07:32 twice Exp $ *} <form id="Tracking" name="Tracking" action="http://www.tntexpress.com.au/InterAction/ASPs/CnmHxAS.asp?{$order.tracking}" method="post" target="_blank"> <input type="submit" value="{$lng.lbl_track_it|strip_tags:false|escape}" /> <br /> {$lng.txt_tnt_redirection} </form>

Nice and neat, and it returns ONLY the tracking information, without any other TNT web page clutter.

Dean
__________________
X-Cart Gold v4.1.8
Reply With Quote
  #27  
Old 09-25-2008, 10:21 PM
  imexhouse's Avatar 
imexhouse imexhouse is offline
 

eXpert
  
Join Date: May 2006
Location: Canada
Posts: 377
 

Default Re: Ability to select shipping carrier for tracking numbers

There's no stopping you now!
__________________
Jack@AquasanaCA
X-CART GOLD 4.0.19 Live
DSEFU, AOM, ezCheckout, ezUpsell, ezRecommends, RememberMe, RememberAnonCarts
AquasanaCanada.com - Aquasana╝ - #1 Rated Water Filters in America!
X-CART GOLD 4.4.5 Live
CDSEO Pro v. 1.8.4
AquasanaMontreal.com
Aquasana╝ & Rhino Water Filtration Systems
Reply With Quote
  #28  
Old 09-26-2008, 05:03 AM
 
floyd_2 floyd_2 is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 69
 

Default Re: Ability to select shipping carrier for tracking numbers

Ok...this is my last word on the topic for the evening lol.

Here is a much tidier way of handling Couriers Please in Australia:

HTML Code:
{* $Id: couriers_please.tpl,v 1.1 2008/09/25 14:07:32 twice Exp $ *} <form name="barcode" action="http://www.couriersplease.com.au/track.php?printable=true&couponid={$order.tracking}" method="post" target="_blank"> <input type="submit" value="{$lng.lbl_track_it|strip_tags:false|escape}" /> <br /> {$lng.txt_cplease_redirection} </form>

If you prefer a plain HTML result page without the Couriers Please banner on the top, just remove "printable=true&" and you'll get the plain result page. I figure that the printable version of the page with the Couriers Please logo on top is better for my customers.

Don't forget to go to Languages and add txt_cplease_redirection with appropriate text (like "You will be redirected to Couriers Please Delivery service site, by clicking this button."). Also update skin1/main/history_order.tpl using the post above by imexhouse as a guide.

Dean
__________________
X-Cart Gold v4.1.8
Reply With Quote
  #29  
Old 09-26-2008, 06:22 AM
 
floyd_2 floyd_2 is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 69
 

Default Re: Ability to select shipping carrier for tracking numbers

Looks like I lied...this is really my last post for the evening. I have tidied up the CanadaPost code now - much better this way:

HTML Code:
{* $Id: canada_post.tpl,v 1.1 2008/09/26 14:07:32 twice Exp $ *} <form name="basicPinForm" action="https://em.canadapost.ca/emo_business/basicPin.do?language=en&trackingId={$order.tracking}&action=query&trackingCode=PIN" method="post" target="_blank"> <input type="submit" value="{$lng.lbl_track_it|strip_tags:false|escape}" /> <br /> {$lng.txt_cpc_redirection} </form>

Dean
__________________
X-Cart Gold v4.1.8
Reply With Quote
  #30  
Old 09-26-2008, 08:58 AM
  Jayk's Avatar 
Jayk Jayk is offline
 

eXpert
  
Join Date: Nov 2003
Location: Calgary, Alberta, Canada
Posts: 333
 

Default Re: Ability to select shipping carrier for tracking numbers

Thanks very much for the code Dean. I look forward to getting this implemented into my shop. Now I just need a few spare minutes...

Jason
__________________
X-Cart Gold 4.4.3
Blog: www.flashinthepan.ca
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:11 PM.

   

 
X-Cart forums © 2001-2020