function recycle() { $scarebuying_log = $this->system->loadModel('plugins/scarebuying/scarebuying_log'); foreach ($_POST['order_id'] as $orderid) { $scarebuying_log->deleteByOrderId($orderid); } parent::recycle(); }
function detail($order_id, $selecttype = false) { $this->pagedata['_MAIN_'] = CORE_DIR . '/shop/view/order/detail.html'; parent::detail($order_id, $selecttype); }
function toDelivery($order_id) { include_once "delivercorp.php"; $params['method'] = 'taobao.delivery.send'; $company_code = getCompany_code($_POST['logi_id'] - 1); if ($_POST['logi_id'] == 'other') { $company_code = 'other'; } if ($company_code == 'virtual_goods') { $params['orderType'] = 'virtual_goods'; $params['out_sid'] = 888888; } else { $params['orderType'] = 'delivery_needed'; $params['out_sid'] = $_POST['logi_no']; } $params['company_code'] = $company_code; $params['seller_name'] = $_POST['seller_name']; $params['seller_area_id'] = $_POST['region_id']; $params['seller_address'] = $_POST['seller_address']; $params['seller_zip'] = $_POST['seller_zip']; $params['seller_phone'] = $_POST['seller_phone']; $params['seller_mobile'] = $_POST['seller_tel']; $params['memo'] = $_POST['memo']; $params['tid'] = $_POST['order_id']; $return_tb_msg = $this->tb->getContents($params); if (isset($return_tb_msg['error_response']['sub_msg'])) { $this->template_dir = CORE_DIR . '/admin/view/'; $this->splash('failed', 'index.php?ctl=plugins/order_ctl&act=showConsignFlow&p[0]=' . $order_id, $return_tb_msg['error_response']['sub_msg']); exit; } $date = getdeliverycorplist(); $aCorp = $date[$_POST['logi_id'] - 1]; $_POST['logi_name'] = $aCorp['name']; $db = $this->system->database(); $db->exec("UPDATE sdb_orders SET ship_status = 1 WHERE order_id =" . $order_id, true); $db->exec("UPDATE sdb_tb_order_ctl_orders SET delivery_time = " . time() . " WHERE order_id =" . $order_id, true); echo '发货成功'; parent::toDelivery($order_id); }