Lookup Order
LookupOrder($id);
if($o != null) {
echo sprintf("%s, %s
\r\n", $o->customer->name, $o->customer->address);
echo sprintf("%s $%.2f %s
\r\n", $o->orderdate, $o->getTotalPrice(), $o->status);
echo "\r\n";
foreach($o->lines as $ol) {
echo "\r\n";
echo sprintf("| %s | \r\n", $ol->product->name);
echo sprintf("%d | \r\n", $ol->quantity);
echo sprintf("$%.2f | \r\n", $ol->product->price);
echo sprintf("$%.2f | \r\n", $ol->quantity * $ol->product->price);
echo "
\r\n";
}
} else {
echo "Order id does not exist
\r\n";
}
echo "
\r\n";
}
?>