当前位置: 首页>>代码示例>>PHP>>正文


PHP send_order_bonus函数代码示例

本文整理汇总了PHP中send_order_bonus函数的典型用法代码示例。如果您正苦于以下问题:PHP send_order_bonus函数的具体用法?PHP send_order_bonus怎么用?PHP send_order_bonus使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了send_order_bonus函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: trim

 // 发货时间
 $arr['invoice_no'] = trim($order['invoice_no'] . '<br>' . $invoice_no, '<br>');
 update_order($order_id, $arr);
 /* 发货单发货记录log */
 order_action($order['order_sn'], OS_CONFIRMED, $shipping_status, $order['pay_status'], $action_note, null, 1);
 /* 如果当前订单已经全部发货 */
 if ($order_finish) {
     /* 如果订单用户不为空,计算积分,并发给用户;发红包 */
     if ($order['user_id'] > 0) {
         /* 取得用户信息 */
         $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;
         $tpl = get_mail_template('deliver_notice');
         $smarty->assign('order', $order);
         $smarty->assign('send_time', local_date($_CFG['time_format']));
         $smarty->assign('shop_name', $_CFG['shop_name']);
         $smarty->assign('send_date', local_date($_CFG['date_format']));
         $smarty->assign('sent_date', local_date($_CFG['date_format']));
         $smarty->assign('confirm_url', $ecs->url() . 'receive.php?id=' . $order['order_id'] . '&con=' . rawurlencode($order['consignee']));
         $smarty->assign('send_msg_url', $ecs->url() . 'user.php?act=message_list&order_id=' . $order['order_id']);
         $content = $smarty->fetch('str:' . $tpl['template_content']);
         if (!send_mail($order['consignee'], $order['email'], $tpl['template_subject'], $content, $tpl['is_html'])) {
开发者ID:norain2050,项目名称:benhu,代码行数:31,代码来源:order.php

示例2: COUNT

         /* 虚拟卡发货 */
         if (virtual_goods_ship($virtual_goods, $msg, $order['order_sn'], true)) {
             /* 如果没有实体商品,修改发货状态,送积分和红包 */
             $sql = "SELECT COUNT(*)" . " FROM " . $ecs->table('order_goods') . " WHERE order_id = '{$order['order_id']}' " . " AND is_real = 1";
             if ($db->getOne($sql) <= 0) {
                 /* 修改订单状态 */
                 update_order($order['order_id'], array('shipping_status' => SS_SHIPPED, 'shipping_time' => gmtime()));
                 /* 如果订单用户不为空,计算积分,并发给用户;发红包 */
                 if ($order['user_id'] > 0) {
                     /* 取得用户信息 */
                     $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['order_id']);
                 }
             }
         }
     }
 }
 /* 清空购物车 */
 clear_cart($flow_type);
 /* 清除缓存,否则买了商品,但是前台页面读取缓存,商品数量不减少 */
 clear_all_files();
 /* 插入支付日志 */
 $order['log_id'] = insert_pay_log($new_order_id, $order['order_amount'], PAY_ORDER);
 /* 取得支付信息,生成支付代码 */
 if ($order['order_amount'] > 0) {
     $payment = payment_info($order['pay_id']);
     include_once 'includes/modules/payment/' . $payment['pay_code'] . '.php';
开发者ID:will0306,项目名称:bianli100,代码行数:31,代码来源:flow.php

示例3: delivery


//.........这里部分代码省略.........
            if (($value['sums'] > $value['goods_number'] || $value['goods_number'] <= 0) && ($_CFG['use_storage'] == '1' && $_CFG['stock_dec_time'] == SDT_SHIP || $_CFG['use_storage'] == '0' && $value['is_real'] == 0)) {
                /* 操作失败 */
                $links[] = array('text' => $GLOBALS['_LANG']['order_info'], 'href' => 'order.php?act=delivery_info&delivery_id=' . $delivery_id);
                sys_msg(sprintf($GLOBALS['_LANG']['act_good_vacancy'], $value['goods_name']), 1, $links);
                break;
            }
            /* 虚拟商品列表 virtual_card*/
            if ($value['is_real'] == 0) {
                $virtual_goods[] = array('goods_id' => $value['goods_id'], 'goods_name' => $value['goods_name'], 'num' => $value['send_number']);
            }
        }
    }
    /* 发货 */
    /* 处理虚拟卡 商品(虚货) */
    if (is_array($virtual_goods) && count($virtual_goods) > 0) {
        foreach ($virtual_goods as $virtual_value) {
            virtual_card_shipping($virtual_value, $order['order_sn'], $msg, 'split');
        }
    }
    /* 如果使用库存,且发货时减库存,则修改库存 */
    if ($_CFG['use_storage'] == '1' && $_CFG['stock_dec_time'] == SDT_SHIP) {
        foreach ($delivery_stock_result as $value) {
            /* 商品(实货)、超级礼包(实货) */
            if ($value['is_real'] != 0) {
                //(货品)
                if (!empty($value['product_id'])) {
                    $minus_stock_sql = "UPDATE " . $GLOBALS['ecs']->table('products') . "\r\n                                        SET product_number = product_number - " . $value['sums'] . "\r\n                                        WHERE product_id = " . $value['product_id'];
                    $GLOBALS['db']->query($minus_stock_sql, 'SILENT');
                }
                $minus_stock_sql = "UPDATE " . $GLOBALS['ecs']->table('goods') . "\r\n                                    SET goods_number = goods_number - " . $value['sums'] . "\r\n                                    WHERE goods_id = " . $value['goods_id'];
                $GLOBALS['db']->query($minus_stock_sql, 'SILENT');
            }
        }
    }
    /* 修改发货单信息 */
    $invoice_no = str_replace(',', '<br>', $delivery['invoice_no']);
    $invoice_no = trim($invoice_no, '<br>');
    $_delivery['invoice_no'] = $invoice_no;
    $_delivery['status'] = 0;
    // 0,为已发货
    $query = $db->autoExecute($ecs->table('delivery_order'), $_delivery, 'UPDATE', "delivery_id = {$delivery_id}", 'SILENT');
    if (!$query) {
        /* 操作失败 */
        $links[] = array('text' => $GLOBALS['_LANG']['delivery_sn'] . $GLOBALS['_LANG']['detail'], 'href' => 'order.php?act=delivery_info&delivery_id=' . $delivery_id);
        sys_msg($GLOBALS['_LANG']['act_false'], 1, $links);
    }
    /* 标记订单为已确认 “已发货” */
    /* 更新发货时间 */
    $order_finish = get_all_delivery_finish($order_id);
    $shipping_status = $order_finish == 1 ? SS_SHIPPED : SS_SHIPPED_PART;
    $arr['shipping_status'] = $shipping_status;
    $arr['shipping_time'] = GMTIME_UTC;
    // 发货时间
    $arr['invoice_no'] = trim($order['invoice_no'] . '<br>' . $invoice_no, '<br>');
    update_order($order_id, $arr);
    /* 发货单发货记录log */
    order_action($order['order_sn'], OS_CONFIRMED, $shipping_status, $order['pay_status'], $action_note, null, 1);
    /* 如果当前订单已经全部发货 */
    if ($order_finish) {
        /* 如果订单用户不为空,计算积分,并发给用户;发红包 */
        if ($order['user_id'] > 0) {
            /* 取得用户信息 */
            $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($GLOBALS['_LANG']['order_gift_integral'], $order['order_sn']));
            /* 发放红包 */
            send_order_bonus($order_id, $order['supplier_id']);
        }
        /* 发送邮件 */
        $cfg = $_CFG['send_ship_email'];
        if ($cfg == '1') {
            $order['invoice_no'] = $invoice_no;
            $tpl = get_mail_template('deliver_notice');
            $smarty->assign('order', $order);
            $smarty->assign('send_time', local_date($_CFG['time_format']));
            $smarty->assign('shop_name', $_CFG['shop_name']);
            $smarty->assign('send_date', local_date($_CFG['date_format']));
            $smarty->assign('sent_date', local_date($_CFG['date_format']));
            $smarty->assign('confirm_url', $ecs->url() . 'receive.php?id=' . $order['order_id'] . '&con=' . rawurlencode($order['consignee']));
            $smarty->assign('send_msg_url', $ecs->url() . 'user.php?act=message_list&order_id=' . $order['order_id']);
            $content = $smarty->fetch('str:' . $tpl['template_content']);
            if (!send_mail($order['consignee'], $order['email'], $tpl['template_subject'], $content, $tpl['is_html'])) {
                $msg = $GLOBALS['_LANG']['send_mail_fail'];
            }
        }
        /* 如果需要,发短信 */
        if ($GLOBALS['_CFG']['sms_order_shipped'] == '1' && $order['mobile'] != '') {
            include_once '../send.php';
            $content = '您的订单已发货,订单号为' . $order['order_sn'] . '收货人为' . $order['consignee'] . '收货地址为' . $order['address'] . ',请注意查收【' . $GLOBALS['_CFG']['shop_name'] . '】';
            sendSMS($order['mobile'], $content);
        }
    }
    /* 清除缓存 */
    clear_cache_files();
    /* 操作成功 */
    $links[] = array('text' => $GLOBALS['_LANG']['09_delivery_order'], 'href' => 'order.php?act=delivery_list');
    $links[] = array('text' => $GLOBALS['_LANG']['delivery_sn'] . $GLOBALS['_LANG']['detail'], 'href' => 'order.php?act=delivery_info&delivery_id=' . $delivery_id);
    sys_msg($GLOBALS['_LANG']['act_ok'], 0, $links);
}
开发者ID:seanguo166,项目名称:yinoos,代码行数:101,代码来源:order.php

示例4: isset

    $id = isset($_GET['id']) ? intval($_GET['id']) : 0;
    if ($id == 0 || $user_id == 0) {
        hhs_header("Location: user.php?act=booking_list\n");
        exit;
    }
    $result = delete_booking($id, $user_id);
    if ($result) {
        hhs_header("Location: user.php?act=booking_list\n");
        exit;
    }
} elseif ($action == 'affirm_received') {
    include_once ROOT_PATH . 'includes/lib_transaction.php';
    include_once ROOT_PATH . 'includes/lib_order.php';
    $order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0;
    if (affirm_received($order_id, $user_id)) {
        $bonus_list = send_order_bonus($order_id);
        if (!empty($bonus_list)) {
            hhs_header("Location: share_bonus.php?order_id=" . $order_id);
            exit;
        }
        hhs_header("Location: user.php?act=order_list\n");
        exit;
    } else {
        hhs_header("Location: user.php?act=order_list\n");
        exit;
        //$err->show($_LANG['order_list_lnk'], 'user.php?act=order_list');
    }
} elseif ($action == 'account_raply') {
    $smarty->display('user_transaction.dwt');
} elseif ($action == 'account_deposit') {
    include_once ROOT_PATH . 'includes/lib_clips.php';
开发者ID:shiruolin,项目名称:hzzshop,代码行数:31,代码来源:user.php

示例5: trim

 // 发货时间
 $arr['invoice_no'] = trim($order['invoice_no'] . '<br>' . $invoice_no, '<br>');
 update_order($order_id, $arr);
 /* 发货单发货记录log */
 order_action($order['order_sn'], OS_CONFIRMED, $shipping_status, $order['pay_status'], $action_note, null, 1);
 /* 如果当前订单已经全部发货 */
 if ($order_finish) {
     /* 如果订单用户不为空,计算积分,并发给用户;发红包 */
     if ($order['user_id'] > 0) {
         /* 取得用户信息 */
         $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, $order['supplier_id']);
     }
     /* 发送邮件 */
     $cfg = $_CFG['send_ship_email'];
     if ($cfg == '1') {
         $order['invoice_no'] = $invoice_no;
         $tpl = get_mail_template('deliver_notice');
         $smarty->assign('order', $order);
         $smarty->assign('send_time', local_date($_CFG['time_format']));
         $smarty->assign('shop_name', $_CFG['shop_name']);
         $smarty->assign('send_date', local_date($_CFG['date_format']));
         $smarty->assign('sent_date', local_date($_CFG['date_format']));
         $smarty->assign('confirm_url', $ecs->url() . 'receive.php?id=' . $order['order_id'] . '&con=' . rawurlencode($order['consignee']));
         $smarty->assign('send_msg_url', $ecs->url() . 'user.php?act=message_list&order_id=' . $order['order_id']);
         $content = $smarty->fetch('str:' . $tpl['template_content']);
         if (!send_mail($order['consignee'], $order['email'], $tpl['template_subject'], $content, $tpl['is_html'])) {
开发者ID:moonlight-wang,项目名称:feilun,代码行数:31,代码来源:order.php

示例6: done


//.........这里部分代码省略.........
	error_log('4',3,'flow.log');
	        $virtual_goods = array();
	        foreach ($res AS $row)
	        {
	            $virtual_goods['virtual_card'][] = array('goods_id' => $row['goods_id'], 'goods_name' => $row['goods_name'], 'num' => $row['num']);
	        }
	
	        if ($virtual_goods AND $flow_type != CART_GROUP_BUY_GOODS)
	        {
	            /* 虚拟卡发货 */
	            if (virtual_goods_ship($virtual_goods,$msg, $order['order_sn'], true))
	            {
	                /* 如果没有实体商品,修改发货状态,送积分和红包 */
	                $sql = "SELECT COUNT(*)" .
	                        " FROM " . $ecs->table('order_goods') .
	                        " WHERE order_id = '$order[order_id]' " .
	                        " AND is_real = 1";
	                if ($db->getOne($sql) <= 0)
	                {
	                    /* 修改订单状态 */
	                    update_order($order['order_id'], array('shipping_status' => SS_SHIPPED, 'shipping_time' => gmtime()));
	error_log('5',3,'flow.log');
	                    /* 如果订单用户不为空,计算积分,并发给用户;发红包 */
	                    if ($order['user_id'] > 0)
	                    {
	                        /* 取得用户信息 */
	                        $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']));
	error_log('6',3,'flow.log');
	                        /* 发放红包 */
	                        send_order_bonus($order['order_id']);
	                    }
	                }
	            }
	        }
	
	    }
	
	    /* 清空购物车 */
	    clear_cart($flow_type);
	error_log('7',3,'flow.log');
	    /* 清除缓存,否则买了商品,但是前台页面读取缓存,商品数量不减少 */
	    clear_all_files();
	
	    /* 插入支付日志 */
	    //$order['log_id'] = insert_pay_log($new_order_id, $order['order_amount'], PAY_ORDER);
	
	   error_log('8',3,'flow.log'); 
		
		/*取得支付代码
	
		#取得支付信息,生成支付代码 
	    if ($order['order_amount'] > 0)
	    {
	        $payment = payment_info($order['pay_id']);
	
	        include_once('includes/modules/payment/' . $payment['pay_code'] . '.php');
	
	        $pay_obj    = new $payment['pay_code'];
	
	        $pay_online = $pay_obj->get_code($order, unserialize_config($payment['pay_config']));
	
	        $order['pay_desc'] = $payment['pay_desc'];
开发者ID:noikiy,项目名称:mdwp,代码行数:67,代码来源:flow.action.php


注:本文中的send_order_bonus函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。