下订单后怎么自动让订单设为确认状态

2016-07-07 15:33 来源:www.chinab4c.com 作者:ecshop专家

现在用户下的订单 状态为 未确认,
请问怎么样才可以让订单生成后自动确认?

回答:
如果是已经付款了,那么状态会自动改变

flow.php中done中

该数组修改成
$order = array(
'shipping_id'=> intval($_POST['shipping']),
'pay_id' => intval($_POST['payment']),
'pack_id'=> isset($_POST['pack']) ? intval($_POST['pack']) : 0,
'card_id'=> isset($_POST['card']) ? intval($_POST['card']) : 0,
'card_message' => trim($_POST['card_message']),
'surplus'=> isset($_POST['surplus']) ? floatval($_POST['surplus']) : 0.00,
'integral'=> isset($_POST['integral']) ? intval($_POST['integral']) : 0,
'bonus_id'=> isset($_POST['bonus']) ? intval($_POST['bonus']) : 0,
'need_inv'=> empty($_POST['need_inv']) ? 0 : 1,
'inv_type'=> $_POST['inv_type'],
'inv_payee' => trim($_POST['inv_payee']),
'inv_content'=> $_POST['inv_content'],
'postscript'=> trim($_POST['postscript']),
'how_oos'=> isset($_LANG['oos'][$_POST['how_oos']]) ? addslashes($_LANG['oos'][$_POST['how_oos']]) : '',
'need_insure'=> isset($_POST['need_insure']) ? intval($_POST['need_insure']) : 0,
'user_id'=> $_SESSION['user_id'],
'add_time'=> gmtime(),
'order_status' => 1,
'shipping_status' => SS_UNSHIPPED,
'pay_status'=> PS_UNPAYED,
'agency_id' => get_agency_by_regions(array($consignee['country'], $consignee['province'], $consignee['city'], $consignee['district']))
);


满意把?