예제 #1
0
 public function index()
 {
     $order = CustomerOrder::getInstanceById($this->request->get('id'));
     $transactions = $this->appendOfflineTransactionData($this->getTransactionArray($order));
     ActiveRecordModel::addArrayToEavQueue('Transaction', $transactions);
     foreach ($transactions as $id => $transaction) {
         if (isset($transaction['ParentTransaction'])) {
             unset($transactions[$id]);
         }
     }
     $orderArray = $order->toArray(array('payments' => true));
     $captureForm = $this->buildCaptureForm();
     $captureForm->set('amount', $orderArray['amountNotCaptured']);
     $response = new ActionResponse();
     $response->set('transactions', $transactions);
     $response->set('order', $orderArray);
     $response->set('offlinePaymentForm', $this->buildOfflinePaymentForm());
     $response->set('capture', $captureForm);
     return $response;
 }
예제 #2
0
 protected function processDataArray($dataArray, $displayedColumns)
 {
     // load specification data
     if ($this->isEav()) {
         foreach ($displayedColumns as $column => $type) {
             if (!strpos($column, '.')) {
                 continue;
             }
             list($class, $field) = explode('.', $column, 2);
             if ('eavField' == $class) {
                 ActiveRecordModel::addArrayToEavQueue($this->getClassName(), $dataArray);
                 ActiveRecordModel::loadEav();
                 break;
             }
         }
     }
     return $dataArray;
 }