Perhaps changing that "new" block:
Code:
if (function_exists('zen_update_orders_history')) {
zen_update_orders_history((int)$_GET['order_number'], $comments, (!empty($_GET['SS-UserName']) ? zen_db_input($_GET['SS-UserName']) : 'ShipStation'), $status, $customer_notified, false);
} else {
$db->Execute("update " . TABLE_ORDERS . "
set orders_status = '" . zen_db_input($status) . "', last_modified = now()
where orders_id = '" . (int) $_GET['order_number'] . "'");
$db->Execute("insert into " . TABLE_ORDERS_STATUS_HISTORY . "
(orders_id, orders_status_id, date_added, customer_notified, comments)
values ('" . (int) $_GET['order_number'] . "',
'" . zen_db_input($status) . "',
now(),
'" . zen_db_input($customer_notified) . "',
'" . zen_db_input($comments) . "')");
echo 'Status updated successfully';
}
... so that the echo's always performed:
Code:
if (function_exists('zen_update_orders_history')) {
zen_update_orders_history((int)$_GET['order_number'], $comments, (!empty($_GET['SS-UserName']) ? zen_db_input($_GET['SS-UserName']) : 'ShipStation'), $status, $customer_notified, false);
} else {
$db->Execute("update " . TABLE_ORDERS . "
set orders_status = '" . zen_db_input($status) . "', last_modified = now()
where orders_id = '" . (int) $_GET['order_number'] . "'");
$db->Execute("insert into " . TABLE_ORDERS_STATUS_HISTORY . "
(orders_id, orders_status_id, date_added, customer_notified, comments)
values ('" . (int) $_GET['order_number'] . "',
'" . zen_db_input($status) . "',
now(),
'" . zen_db_input($customer_notified) . "',
'" . zen_db_input($comments) . "')");
// echo 'Status updated successfully';
}
echo 'Status updated successfully';
Bookmarks