public function delete($id) { $data = array(); $status = Response::STATUS_NOT_FOUND; if (fn_delete_shipments($id)) { $status = Response::STATUS_OK; $data['message'] = 'Ok'; } return array('status' => $status, 'data' => $data); }
public function delete($id) { $data = array(); $status = Response::STATUS_NOT_FOUND; if (fn_delete_shipments($id)) { $status = Response::STATUS_NO_CONTENT; } return array('status' => $status, 'data' => $data); }
fn_update_shipment($_REQUEST['shipment_data'], 0, 0, false, $force_notification); $suffix = '.details?order_id=' . $_REQUEST['shipment_data']['order_id']; } if ($mode == 'packing_slip' && !empty($_REQUEST['shipment_ids'])) { fn_print_shipment_packing_slips($_REQUEST['shipment_ids'], Registry::get('runtime.dispatch_extra') == 'pdf'); exit; } if ($mode == 'm_delete' && !empty($_REQUEST['shipment_ids'])) { fn_delete_shipments($_REQUEST['shipment_ids']); if (!empty($_REQUEST['redirect_url'])) { return array(CONTROLLER_STATUS_REDIRECT, $_REQUEST['redirect_url']); } } if ($mode == 'delete' && !empty($_REQUEST['shipment_ids']) && is_array($_REQUEST['shipment_ids'])) { $shipment_ids = implode(',', $_REQUEST['shipment_ids']); fn_delete_shipments($shipment_ids); return array(CONTROLLER_STATUS_OK, 'shipments.manage'); } return array(CONTROLLER_STATUS_OK, 'orders' . $suffix); } $params = $_REQUEST; if ($mode == 'details') { if (empty($params['order_id']) && empty($params['shipment_id'])) { return array(CONTROLLER_STATUS_NO_PAGE); } if (!empty($params['shipment_id'])) { $params['order_id'] = db_get_field('SELECT ?:shipment_items.order_id FROM ?:shipment_items WHERE ?:shipment_items.shipment_id = ?i', $params['shipment_id']); } $shippings = db_get_array("SELECT a.shipping_id, a.min_weight, a.max_weight, a.position, a.status, b.shipping, b.delivery_time, a.usergroup_ids FROM ?:shippings as a LEFT JOIN ?:shipping_descriptions as b ON a.shipping_id = b.shipping_id AND b.lang_code = ?s WHERE a.status = ?s ORDER BY a.position", DESCR_SL, 'A'); $order_info = fn_get_order_info($params['order_id'], false, true, true); if (empty($order_info)) {