
Nigel Wainwright - 2006-04-20 21:46:35
I have tried this class but I get the following error:
Fatal error: Call to a member function on a non-object in /home/xxxxxx/xxxxxxx/mysite/index.php on line 33
This is my test code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php
include 'ups_tracker.class.php';
?>
</head>
<body>
<input name="n" type="hidden" value="1Z 433 917 03 5195 331 2">
<?php
$n = $_GET['n']; //UPS number to track
$foo = new UPS_XML_PACKAGE_TRACKER();
$foo->setActivity('activity'); //if 0 , it will display only last status
$foo->settTackingNumber($n);
$foo->request_init(ups_userid,ups_xml_access_key,hell_world);
$foo->send_request();
$response = $foo->getResponseData();
$bar = new UPS_XML_PACKAGE_TRACKER_HTML_RESPONSE();
$bar->init($response,$n);
$bar->html();
$result = $bar->gethtml();
$render->assign("result", $result); //smarty :)
?>
</body>
</html>
I would appreciate any help you can give as this would be really useful script for my shopping cart.