return sprintf("<span class=\"small\">%s</span> on %s", get_order_parcel_string($order), $order->getDate());
}
+ function get_order_state_string($order_state = null) {
+ global $states;
+
+ if (is_null($order_state)) return null;
+
+ for ($i = 0; $i < count($states); $i++) {
+ if ($order_state->getState() & (1 << $i)) {
+ return $states[$i];
+ }
+ }
+
+ return "unknown";
+ }
+
+ function get_order_state($order) {
+ $q = new OrderStateQuery();
+ return $q->filterByOrderId($order->getId())->orderByUpdated('desc')->findOne();
+ }
+
function get_order_summary($order) {
$ret = "Order " . $order->getStrongLink($order->getId()) . ": " . get_order_displayname($order);