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
  #31  
Old 09-28-2008, 06:42 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

Perfect! Without all the unnecessary clutter.
Thanks, floyd_2!
__________________
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
  #32  
Old 03-04-2009, 04:36 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

I know it's been months since the last post, but does anybody know how to modify the code to make it work with mulitple tracking numbers?
__________________
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
  #33  
Old 03-05-2009, 02:05 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

Hi imexhouse,
this is potentially a very simple one. With TNT in Australia for example, you just need to separate your tracking numbers with a comma. For example:

ECN002206500,ECN002206501

When that string is passed in the $order.tracking variable, TNT parses each tracking number in turn in the tracking results page.

With Canada Post, by memory the tracking screen only accepts a single tracking number as input. I don't have any valid tracking numbers any more to test their site though. I know they have a second page for tracking multiple packages too.

For starters, it might be worth just substituting a comma separated list of two tracking numbers into $order.tracking and see if CA Post accepts it.

Are you still using CA Post?

Dean
__________________
X-Cart Gold v4.1.8
Reply With Quote
  #34  
Old 03-05-2009, 02:39 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, you knew I wouldn't let it go at that didn't you...

Assuming you're using CA Post...CA Post uses a slightly different URL for multi consignment tracking. The code you need to use is based on this:


Forgetting the two dummy consignment numbers in there, you really just need to change basicPin.do to multiPinPool.do in your existing query string. That's the first bit.

Secondly, you need to be able to string your consignment numbers in such a way that a line feed is generated between each one, whilst still keeping the syntax of the URL correct.

This is just a little ugly, but it IS cheap Delimit your consignment numbers when you type them into the Tracking Number field for an order inside X-Cart with the following string:

Quote:
%0d%0a

This will generate a line feed in the CA Post multi tracking number input window.

Whilst it will look just a little odd to the end user when they see a tracking number like:

Quote:
AA123456789AA&0d%0aAA987654321AA

it will actually work. Besides....who really looks at the actual number - its the results that we're after!

Give it a try - it worked in my tests here and means absolutely minimal changes to your X-Cart.

Dean
__________________
X-Cart Gold v4.1.8
Reply With Quote
  #35  
Old 03-05-2009, 03:13 AM
  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

floyd_2:

Thank you for your input. I knew that the URL for the multiple tracking numbers for Canada Post was different. What I choked on was the separation of the 2, or 3, or more tracking numbers.
I'll try %0d%0a.
Now, if I wanted to replace the
Quote:
<INPUT type="text" name="tracking" size="28" value="{$order.tracking}">

in the main/history_order.tpl with <textarea>, and then put the numbers on separate lines, how would we represent the split by line in the <textarea> tag? Would we still use the %0d%0a?
If so, than exactly how?
I've tried multiple "solutions", mainly javascript that are floating out there, but nothing seems to split the text by line breaks.
So, although I have in the text area:

717124500043433
717125465055500

the numbers get concatenated when the input gets to CPC tracking page and we get an error

To answer your question "Who actually looks at the tracking numbers", my customers do - more and more frequently, they use tracking numbers to locate their shipments, given the poor performance of CPC lately (misdirected and late shipments). In the past week alone, I've had 3 customers complaining about not getting their complete orders, although all their boxes would've been shipped at the same time. This is particularly so with heavy boxes - orders that consists of 2 boxes, one 5 lbs and one 55 lbs. Mysteriously, only the light box would be delievered on time, and the heavy one would get left behind

Thanks.
__________________
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
  #36  
Old 04-28-2009, 03:57 AM
  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

Canada Post has changed their tracking page, and the old tracking code no longer works.

Here's the new version:

Quote:
<form name="findByTrackNumber" action="http://www.canadapost.ca/cpotools/apps/track/personal/findByTrackNumber?trackingNumber={$order.tracking} &language=en" method="post" target="_blank">
<input type="submit" value="{$lng.lbl_track_it|strip_tags:false|escape} " />
<br />
{$lng.txt_cpc_redirection}
</form>


__________________
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
  #37  
Old 03-23-2010, 12:57 AM
 
stuartdrennan stuartdrennan is offline
 

Newbie
  
Join Date: May 2009
Posts: 6
 

Default Re: Ability to select shipping carrier for tracking numbers

Hi

I rellay like this mod by inksticks, would anyone know if this will work ok with 4.2 or is there a mod that will?

Thanks

Stuart
__________________
X-Cart version 4.2.0
Reply With Quote
  #38  
Old 04-13-2010, 09:36 AM
 
mrerotic mrerotic is offline
 

eXpert
  
Join Date: Feb 2009
Posts: 264
 

Default Re: Ability to select shipping carrier for tracking numbers

Here is an updated version I did to work with 4.2.x

This version does not add another database table field it uses the existing field and updates the order information accordingly.

Open /admin/order.php
Find:
Code:
require $xcart_dir."/include/history_order.php";

Below add:
Code:
# Get Shipping Options for order admin area to update manually (Addon) $adminship = func_query("SELECT * FROM $sql_tbl[shipping] WHERE active='Y' ORDER BY code, shipping DESC"); $smarty->assign("adminshipoptions", $adminship);

Find:
Code:
$query_data = array ( "tracking" => $tracking, "customer_notes" => $customer_notes, "notes" => $notes, "distr_order_update" => $distr_order_update );

Replace with:
Code:
# Get Updated Shipping Id For Admin Area $getshipid = func_query_first_cell("SELECT shippingid FROM $sql_tbl[shipping] WHERE shipping='".$shipcarrier."'"); $query_data = array ( "tracking" => $tracking, "shippingid" => intval($getshipid), "shipping" => $shipcarrier, "customer_notes" => $customer_notes, "notes" => $notes, "distr_order_update" => $distr_order_update );

Create New Template (order_shipping_vendor.tpl)
Save to /skin1/main/order_shipping_vendor.tpl
Code:
{* $Id: order_shipping_vendor.tpl,v 1.4 2004/05/28 12:21:03 max Exp $ *} <select name="{$name}"> <option value=""{if $shipping eq ""} selected="selected"{/if}>Select A Carrier</option> {foreach from=$adminshipoptions item=addship} <option value="{$addship.shipping}"{if $shipping eq $addship.shipping} selected="selected"{/if}>{$addship.shipping}</option> {/foreach} </select>

Open /skin1/main/order_history.tpl
Find:
Code:
{include file="main/order_status.tpl" status=$order.status mode="select" name="status"}

Add After:
Code:
<br /><br /> Shipping Carrier:<br /> {include file="main/order_shipping_vendor.tpl" shipping=$order.shipping|escape mode="select" name="shipcarrier"}

Now login to your admin area and view an order, under the Order Status you will see a new drop down option called "Shipping Carrier" the default selection is what the customer requested as a carrier. You can change this it will update the order to the new carrier.
__________________
x-cart 4.2.3
AlteredCart Smart Search
Auto Featured Products Mod (Personal Mod)
BCSE Product Importer Pro & Drop Shipper Pro
CDSEO Pro
CMS EZRecommends
EE slider login (Personal Mod)
Next Prev Link Mod (Customized)
ShadowBox Detailed Images (Personal Mod)
Shop By Price (Customized)
Social Media (Personal Mod)
Switch Layout View (Personal Mod)
Special Offers
Testimonials (Personal Mod)
Whats New (Customized)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:30 PM.

   

 
X-Cart forums © 2001-2020