![]() |
Re: Ability to select shipping carrier for tracking numbers
Perfect! Without all the unnecessary clutter.
Thanks, floyd_2! |
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?
|
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 |
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:
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:
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 |
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:
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. |
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:
|
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 |
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) Find: Code:
$query_data = array ( Replace with: Code:
# Get Updated Shipping Id For Admin Area 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 $ *} Open /skin1/main/order_history.tpl Find: Code:
Add After:
Code:
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. |
All times are GMT -8. The time now is 04:37 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.