function getTransactionHistory() { global $toC_Json; $osC_Order = new osC_Order($_REQUEST['orders_id']); $records = array(); foreach ($osC_Order->getTransactionHistory() as $history) { $records[] = array('date' => osC_DateTime::getShort($history['date_added'], true), 'status' => !empty($history['status']) ? $history['status'] : $history['status_id'], 'comments' => nl2br($history['return_value'])); } $response = array(EXT_JSON_READER_ROOT => $records); echo $toC_Json->encode($response); }
</th> <th width="50"><?php echo $osC_Language->get('table_heading_status'); ?> </th> <th width="20"> </th> <th><?php echo $osC_Language->get('table_heading_comments'); ?> </th> </tr> </thead> <tbody> <?php foreach ($osC_Order->getTransactionHistory() as $history) { ?> <tr> <td valign="top"><?php echo osC_DateTime::getShort($history['date_added'], true); ?> </td> <td valign="top"><?php echo !empty($history['status']) ? $history['status'] : $history['status_id']; ?> </td> <td valign="top" align="center"><?php echo osc_icon($history['return_status'] === 1 ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif', null, null); ?> </td>