コード例 #1
0
ファイル: order.php プロジェクト: moonlight-wang/feilun
     if ($order['order_status'] != OS_CONFIRMED && $order['order_status'] != OS_SPLITED && $order['order_status'] != OS_SPLITING_PART) {
         $arr['order_status'] = OS_CONFIRMED;
         $arr['confirm_time'] = GMTIME_UTC;
     }
     $arr['order_status'] = $order_finish ? OS_SPLITED : OS_SPLITING_PART;
     // 全部分单、部分分单
     $arr['shipping_status'] = $shipping_status;
     update_order($order_id, $arr);
 }
 /* 记录log */
 order_action($order['order_sn'], $arr['order_status'], $shipping_status, $order['pay_status'], $action_note);
 /* 如果当前订单已经全部发货 */
 if ($order_finish) {
     /* 如果订单用户不为空,计算积分,并发给用户;发红包 */
     if ($order['user_id'] > 0) {
         pushUserMsg($order['user_id'], array('order_sn' => $order['order_sn'], 'shoping_code' => $invoice_no, 'shoping_type' => $order['shipping_name']), 2);
         $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI'] ? $_SERVER['REQUEST_URI'] : "/admin/";
         $autoUrl = str_replace($_SERVER['REQUEST_URI'], '', $GLOBALS['ecs']->url());
         @file_get_contents($autoUrl . 'weixin/auto_do.php?type=2');
         /* 取得用户信息 */
         $user = user_info($order['user_id']);
         /* 计算并发放积分 */
         $integral = integral_to_give($order);
         log_account_change($order['user_id'], 0, 0, intval($integral['rank_points']), intval($integral['custom_points']), sprintf($_LANG['order_gift_integral'], $order['order_sn']));
         /* 发放红包 */
         send_order_bonus($order_id);
     }
     /* 发送邮件 */
     $cfg = $_CFG['send_ship_email'];
     if ($cfg == '1') {
         $order['invoice_no'] = $invoice_no;
コード例 #2
0
ファイル: flow.php プロジェクト: firsteam/falcons
        $pay_online = $pay_obj->get_code($order, unserialize_config($payment['pay_config']));
        $order['pay_desc'] = $payment['pay_desc'];
        $smarty->assign('pay_online', $pay_online);
    }
    if (!empty($order['shipping_name'])) {
        $order['shipping_name'] = trim(stripcslashes($order['shipping_name']));
    }
    /* 订单信息 */
    $smarty->assign('order', $order);
    $smarty->assign('total', $total);
    $smarty->assign('goods_list', $cart_goods);
    $smarty->assign('order_submit_back', sprintf($_LANG['order_submit_back'], $_LANG['back_home'], $_LANG['goto_user_center']));
    // 返回提示
    //add push msg
    if ($order['user_id']) {
        pushUserMsg($order['user_id']);
    }
    $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI'] ? $_SERVER['REQUEST_URI'] : "/mobile/";
    $autoUrl = str_replace($_SERVER['REQUEST_URI'], "", $GLOBALS['ecs']->url());
    @file_get_contents($autoUrl . "/weixin/auto_do.php?type=1");
    unset($_SESSION['flow_consignee']);
    // 清除session中保存的收货人信息
    unset($_SESSION['flow_order']);
    unset($_SESSION['direct_shopping']);
} elseif ($_REQUEST['step'] == 'update_cart') {
    if (isset($_POST['goods_number']) && is_array($_POST['goods_number'])) {
        flow_update_cart($_POST['goods_number']);
    }
    // show_message($_LANG['update_cart_notice'], $_LANG['back_to_cart'], 'flow.php');
    ecs_header("Location: flow.php\n");
    exit;