} elseif ($_POST['me_action'] == 'RESETLOGISTICPROCESS') { if ($source == Order::ORDER_TYPE_JULIE_GRACE) { $class_o->logisticProcessReset($order_id); } elseif ($source == Order::ORDER_TYPE_SALES_PARTNER) { $class_jo->logisticProcessReset($order_id); } echo utf8_encode('OK'); exit; } elseif ($_POST['me_action'] == 'ADDNEWCOMMENT') { $order_id = tep_db_prepare_input($_POST['order_id']); $comment = tep_db_prepare_input(utf8_decode($_POST['comment'])); $comment_by = $session_userinfo['username']; if ($source == Order::ORDER_TYPE_JULIE_GRACE) { $comment_id = $class_o->insertComment($order_id, $comment, $comment_by); } elseif ($source == Order::ORDER_TYPE_SALES_PARTNER) { $comment_id = $class_jo->insertComment($order_id, $comment, $comment_by); } $result = drawSingleComment($comment_id, $comment_by, time(), $comment); echo utf8_encode($result); exit; } elseif ($_POST['me_action'] == 'DELETECOMMENT') { $order_id = tep_db_prepare_input($_POST['order_id']); $comment_id = tep_db_prepare_input($_POST['comment_id']); if ($source == Order::ORDER_TYPE_JULIE_GRACE) { $class_o->deleteComment($order_id, $comment_id); } elseif ($source == Order::ORDER_TYPE_SALES_PARTNER) { $class_jo->deleteComment($order_id, $comment_id); } echo utf8_encode($comment_id); exit; }
$result .= '<h3>Search Result:</h3>'; $result .= tep_draw_table('spo', $orders_result); //$result .= '<div><input type="button" name="search_more" value="Show More Results" /></div>'; } echo utf8_encode($result); exit; } elseif ($_POST['me_action'] == 'CANCELSPITEM') { $items_id = tep_db_prepare_input($_POST['oi_id']); $old_status = tep_db_prepare_input($_POST['old_status']); $cancelby = tep_db_prepare_input($_POST['cancelby']); $comment = tep_db_prepare_input($_POST['comment']); $class_jo->doCancelOrders($items_id, $old_status, $session_userinfo['username'], $cancelby); if ($comment != '') { $item = $class_jo->retrieveItemDetail($items_id); $comment = 'Cancel ' . $item['article_number'] . ' » ' . $comment; $class_jo->insertComment($item['jng_sp_orders_id'], $comment, $session_userinfo['username']); } $result = array(); $result['oi_id'] = $items_id; $result['new_status'] = 'NONE'; ajaxReturn($result); exit; } } $content .= $class_jo->searchOrderFields(); $javascript = ' var url = "index.php?open=sp-orders-cancel"; var fadeSpeed = 1000; var txtNoMoreOrders = "<h3>No more Orders to show</h3>"; function addedToList(xml, txtStatus) { if(txtStatus=="success") {