public function loadAction()
 {
     $orderId = $this->_getParam('orderId');
     $this->view->order = $order = Axis::single('sales/order')->find($orderId)->current();
     $products = $order->getProducts();
     foreach ($products as &$product) {
         $product['price'] = $product['price'] * $order->currency_rate;
         $product['final_price'] = $product['final_price'] * $order->currency_rate;
         $product['tax_rate'] = $product['tax'] * 100 / $product['final_price'];
     }
     $data['products'] = array_values($products);
     $totals = $order->getTotals();
     foreach ($totals as &$total) {
         $total['value'] = $total['value'] * $order->currency_rate;
     }
     $this->view->totals = $data['totals'] = $totals;
     $data['history'] = $order->getStatusHistory();
     $customer = Axis::single('account/customer')->find($order->customer_id)->current();
     if ($customer instanceof Axis_Db_Table_Row) {
         $data['customer'] = $customer->toArray();
         unset($data['customer']['password']);
         //paranoid
         $data['customer']['group'] = Axis::single('account/customer_group')->getName($customer->group_id);
     } else {
         $data['customer'] = array('firstname' => '-//-', 'lastname' => '-//-', 'group' => 'Guest', 'group_id' => Axis_Account_Model_Customer_Group::GROUP_GUEST_ID, 'email' => $order->customer_email);
     }
     $delivery = $order->getDelivery();
     $data['address']['delivery'] = $delivery->toFlatArray();
     $billing = $order->getBilling();
     $data['address']['billing'] = $billing->toFlatArray();
     $this->view->cc = Axis::single('sales/order_creditcard')->find($order->id)->current();
     $form = $this->view->paymentForm($order->payment_method_code, 'view');
     $data['payment'] = array('name' => $order->payment_method, 'code' => $order->payment_method_code, 'form' => $form);
     $data['shipping'] = array('name' => $order->shipping_method, 'code' => $order->shipping_method_code);
     $order = $order->toArray();
     $order['status_name'] = Axis_Collect_OrderStatusText::getName($order['order_status_id']);
     $order['site_name'] = Axis_Collect_Site::getName($order['site_id']);
     // convert price with rates that was available
     // during order was created (not current rates)
     $order['order_total'] = $order['order_total'] * $order['currency_rate'];
     $data['order'] = $order;
     return $this->_helper->json->setData($data)->sendSuccess();
 }