Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 08-20-2015 08:27:53

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Tracking numbers and BOM

Hi

Here in the UK I don't use UPS/USPS/FedEx for my courier services but, shall we say, cheaper options like myHermes, etc. These companies provide tracking information that I would like to include in the email that my customers receive when I update the system via the BOM xmod.

Would it simply be a case of adding an extra column to the relevant table and getting the email to pick this information up or something not quite as easy?

Thanks

Terry

Last edited by tguswell (08-20-2015 10:14:27)

Offline

 

#2 08-20-2015 10:33:19

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1733

Re: Tracking numbers and BOM

it would be adding a column and printing that data in the order complete email.

However, I use UK Mail but I would assume myhermes would have a similar system.

UK Mail's website allows consignees to search using our reference number(ccp generated order number) and postcode.
Therefore we just provide a link in our order complete email along these lines:
http://www.ukmail.com/manage-my-deliver … de=MK427PN

This completely eliminates the need to do the modification you are considering as you only need to order number and postcode which are already available in the order complete email. You also don't need to waste time entering the consignment number into the BOM.

Obviously this relies on you entering the ccp order number into the myhermes consigment.


Rob

Offline

 

#3 08-21-2015 04:16:23

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Re: Tracking numbers and BOM

Zanart, thank you for your message. Unfortunately with myhermes you can only track via their 16-digit tracking code.

Terry

Offline

 

#4 08-21-2015 06:51:42

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1733

Re: Tracking numbers and BOM

The bom already has a tracking code field for UPS:

https://kryptronic.com/demoeu/admin.php

It may only show if you have UPS enabled, but I expect it would be straightforward to edit the code and use the same field/column for myhermes.


Rob

Offline

 

#5 08-21-2015 08:00:32

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Re: Tracking numbers and BOM

Nick

Is Zanart's comments feasible? Could I alter one of the fields already in the BOM? I would imagine that the USPS would be the obvious one as we don't have the US Postal Service in the UK :-)

All that I want to do is enter my couriers tracking number and have the link (in the form of https://www.myhermes.co.uk/tracking-res … 1111111111) show in the email to customer.

Thanks

Terry

Last edited by tguswell (08-21-2015 08:04:32)

Offline

 

#6 08-24-2015 07:28:11

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19951
Website

Re: Tracking numbers and BOM

Add a column named 'trackhermes' to the ecom_orders table using Raw DB Admin's maintain function.  It should be a Varchar (text) field with a length of about 50, and make sure it's not required.  Name it what  you like, and place it in the section you like.  Make sure the column starts with the string 'track'.  Then edit the file {private}/apps/ecom/ECOM/includes/ordersummaryxhtml.php.  In there you will see the other tracking numbers being addressed.  Your tracking number will be available as $order['order']['trackhermes'].


Nick Hendler

Offline

 

#7 08-24-2015 08:40:27

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Re: Tracking numbers and BOM

Nick

Thanks for that. Now I'm having a senior moment and being a bit stupid.

http://www.caracamp.co.uk/hermes.png

How do I change the coding to make this tracking code number a hyperlink and take the person to the Hermes website within the Order Complete email that is sent?

Terry

Last edited by tguswell (08-24-2015 08:44:40)

Offline

 

#8 08-24-2015 09:13:06

nigel
Member
From: Peterborough, UK
Registered: 04-27-2008
Posts: 418
Website

Re: Tracking numbers and BOM

I think you need to edit the email that is sent: {private}/apps/ecom/ECOM/includes/xmodbommailxhtml.php

Last edited by nigel (08-24-2015 09:13:37)

Offline

 

#9 08-25-2015 10:53:17

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Re: Tracking numbers and BOM

Nigel - thank you for the pointer.

This is what I've amended:

Code:

foreach ($tracking_numbers as $tcol => $tval) {

    if     ($tcol == 'trackupstools') {$name = 'UPS Tracking Number(s)'; $trackable_online++;}
    elseif ($tcol == 'trackusps')     {$name = 'USPS Tracking Number(s)'; $trackable_online++;}
    elseif ($tcol == 'trackfedex')    {$name = 'FedEx Tracking Number(s)'; $trackable_online++;}
    else                              {$name = strtoupper(preg_replace('/^track/','',$tcol)) . ' Tracking Number(s)';}

if ($tcol == 'trackhermes')   {$name = 'myHermes Tracking Number(s)'; print '<p class="strong">' . $name . '</p><p><a href="https://www.myhermes.co.uk/tracking-results.html?trackingNumber=' . $tval . '&tracking-widget-search-submit=Go">' . $tval . '</a></p>' . $eol . $eol;} 

else                          {print '<p class="strong">' . $name . '</p><p>' . $tval . '</p>' . $eol . $eol;}

} // End of foreach statement.

Which I'm sure is not the most elegant of code, but it appears to be working.

Terry

Last edited by tguswell (09-24-2015 11:07:29)

Offline

 

#10 08-26-2015 07:10:44

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19951
Website

Re: Tracking numbers and BOM

I couldn't have done it better myself.


Nick Hendler

Offline

 

#11 08-26-2015 09:25:50

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Re: Tracking numbers and BOM

Now you're just making me blush!

Terry

Offline

 

#12 09-24-2015 10:19:27

geraldz
Member
Registered: 09-27-2011
Posts: 251

Re: Tracking numbers and BOM

That code above was missing a closing </a>.  I updated it to add clickable links for USPS, UPS and FedEx:

Code:

foreach ($tracking_numbers as $tcol => $tval) {

    if     ($tcol == 'trackupstools') {$name = 'UPS Tracking Number(s)'; $trackable_online++;}
    elseif ($tcol == 'trackusps')     {$name = 'USPS Tracking Number(s)'; $trackable_online++;}
    elseif ($tcol == 'trackfedex')    {$name = 'FedEx Tracking Number(s)'; $trackable_online++;}
    else                              {$name = strtoupper(preg_replace('/^track/','',$tcol)) . ' Tracking Number(s)';}

if ($tcol == 'trackupstools')   {$name = 'UPS Tracking Number(s)'; print '<p class="strong">' . $name . '</p><p><a href="http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=' . $tval . '&loc=en_us">' . $tval . '</a></p>' . $eol . $eol;} 

elseif ($tcol == 'trackusps')   {$name = 'USPS Tracking Number(s)'; print '<p class="strong">' . $name . '</p><p><a href="https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=' . $tval . '">' . $tval . '</a></p>' . $eol . $eol;} 

elseif ($tcol == 'trackfedex')   {$name = 'Fed Ex Tracking Number(s)'; print '<p class="strong">' . $name . '</p><p><a href="https://www.fedex.com/apps/fedextrack/?tracknumbers=' . $tval . '&language=en&cntry_code=us">' . $tval . '</a></p>' . $eol . $eol;} 

else                          {print '<p class="strong">' . $name . '</p><p>' . $tval . '</p>' . $eol . $eol;}

} // End of foreach statement.

Offline

 

#13 09-24-2015 11:08:08

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Re: Tracking numbers and BOM

Oops, so it was. I've edited the code to put it right.

Terry

Offline

 

Board footer