[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ic] IC 5.4 UPS, Fedex & Priority Mail Tracking


Here is some suggested code - hope it is beneficial to someone.

I made the following changes in IC 5.4 to allow tracking information to be viewed by customers from check_orders.html

This will allow tracking on the main order only, not individual line items.

--------------------
First I added a field called carrier to the transaction database
and it will hold one of the following values:
UPS
USPS PRIORITY
FEDEX

====
I also modifed the orders/process section of the backend to allow setting of the carrier field
/lib/UI/pages/admin/order_status.html

I did a search for tracking_number and found a Perl string in the above file, which allows modification of the fields displayed in order_status.html - added my new field right after tracking_number
and then it appeared in the UI
====




Snipit of  modified code from check_orders.html
=============


        <td align=right>
                [currency][sql-param total_cost][/currency]
        </td>
        <td>
  [tmp tt_status][sql-param status][/tmp]
  [tmp tt_tst]shipped[/tmp]
[if type=explicit
    compare= "[calc]$Scratch->{tt_status} eq $Scratch->{tt_tst}[/calc]"]



   [tmp tt_carrier][sql-param carrier][/tmp]
   [tmp tt_tmp]UPS[/tmp]
   [if type=explicit
    compare= "[calc]$Scratch->{tt_carrier} eq $Scratch->{tt_tmp}[/calc]"]
<b>Click to Track:</b><br>
<a href="http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=[sql-param tracking_number]&TypeOfInquiryNumber=T" tar$
Shipped UPS
</a>
   [/if]



 [tmp tt_tmp]USPS PRIORITY[/tmp]
   [if type=explicit
    compare= "[calc]$Scratch->{tt_carrier} eq $Scratch->{tt_tmp}[/calc]"]
<form name=track action=http://trkcnfrm1.smi.usps.com/netdata-cgi/db2www/cbd_243.d2w/output method=post>
                <b>Click to Track:</b><br>
                <input tabindex=5 type=hidden value=OK name=CAMEFROM>
<input type=hidden name="strOrigTrackNum" value="[sql-param tracking_number]"> <input class=Submit type=submit value="USPS Priority" name=push>
              </form>
   [/if]


 [tmp tt_tmp]FEDEX[/tmp]
   [if type=explicit
    compare= "[calc]$Scratch->{tt_carrier} eq $Scratch->{tt_tmp}[/calc]"]
<b>Click to Track:</b><br>
<a href= "http://www.fedex.com/cgi-bin/tracking?action=track&language=english&cntry_code=us&initial=x&mps=y&tracknumbers=[sq$
Shipped Fedex</a>
   [/if]




[else]
[display table=transactions type=display col=status key="[sql-code]"]
[/else]
[/if]
        </td>
</tr>
[/query]
</table>
</div>

<!-- END CONTENT -->

@_LEFTONLY_BOTTOM_@




I'll be posting the change in /etc/ship_notice to email the tracking information, soon as it gets tested.

Hope this helps someone, and if anyone has any suggestions - please advise - My ITL is probably not the most efficient.

Steve Graham

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.