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


PHP user_uc_call函数代码示例

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


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

示例1: unserialize_config

        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'];
        $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']));
    // 返回提示
    user_uc_call('add_feed', array($order['order_id'], BUY_GOODS));
    //推送feed到uc
    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');
    exit;
} elseif ($_REQUEST['step'] == 'drop_goods') {
    $rec_id = intval($_GET['id']);
    flow_drop_cart_goods($rec_id);
    ecs_header("Location: flow.php\n");
开发者ID:will0306,项目名称:bianli100,代码行数:31,代码来源:flow.php

示例2: get_goods_gallery

        $smarty->assign('pictures', get_goods_gallery($goods_id));
        // 商品相册
        $smarty->assign('bought_goods', get_also_bought($goods_id));
        // 购买了该商品的用户还购买了哪些商品
        $smarty->assign('goods_rank', get_goods_rank($goods_id));
        // 商品的销售排名
        //获取tag
        $tag_array = get_tags($goods_id);
        $smarty->assign('tags', $tag_array);
        // 商品的标记
        //获取关联tag
        $tag_data = "";
        foreach ($tag_array as $temp_data) {
            $tag_data[] = $temp_data['tag_words'];
        }
        $tag_linked_data = user_uc_call('get_linked_tags', array($tag_data));
        $smarty->assign('tag_linked_data', $tag_linked_data);
        //获取关联礼包
        $package_goods_list = get_package_goods_list($goods['goods_id']);
        $smarty->assign('package_goods_list', $package_goods_list);
        // 获取关联礼包
        assign_dynamic('goods');
        $volume_price_list = get_volume_price_list($goods['goods_id'], '1');
        $smarty->assign('volume_price_list', $volume_price_list);
        // 商品优惠价格区间
    }
}
/* 记录浏览历史 */
if (!empty($_COOKIE['ECS']['history'])) {
    $history = explode(',', $_COOKIE['ECS']['history']);
    array_unshift($history, $goods_id);
开发者ID:BGCX261,项目名称:zishashop-svn-to-git,代码行数:31,代码来源:goods.php

示例3: done


//.........这里部分代码省略.........
                     model('Users')->update_order($order['order_id'], array('shipping_status' => SS_SHIPPED, 'shipping_time' => gmtime()));
                     /* 如果订单用户不为空,计算积分,并发给用户;发红包 */
                     if ($order['user_id'] > 0) {
                         /* 取得用户信息 */
                         $user = model('Order')->user_info($order['user_id']);
                         /* 计算并发放积分 */
                         $integral = model('Order')->integral_to_give($order);
                         model('ClipsBase')->log_account_change($order['user_id'], 0, 0, intval($integral['rank_points']), intval($integral['custom_points']), sprintf(L('order_gift_integral'), $order['order_sn']));
                     }
                 }
             }
         }
     }
     // 销量
     model('Flow')->add_touch_goods($flow_type, $order['extension_code']);
     /* 记录供应商信息 */
     $sql = "update " . $this->model->pre . "order_goods og , " . $this->model->pre . "goods g set og.suppliers_id=g.suppliers_id\r\n            where og.goods_id=g.goods_id and og.order_id='" . $order['order_id'] . "'";
     $this->model->query($sql);
     /* 清空购物车 */
     model('Order')->clear_cart($flow_type);
     /* 清除缓存,否则买了商品,但是前台页面读取缓存,商品数量不减少 */
     clear_all_files();
     /* 插入支付日志 */
     $order['log_id'] = model('ClipsBase')->insert_pay_log($new_order_id, $order['order_amount'], PAY_ORDER);
     /* 取得支付信息,生成支付代码 */
     if ($order['order_amount'] > 0) {
         $payment = model('Order')->payment_info($order['pay_id']);
         include_once ROOT_PATH . 'plugins/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'];
         $this->assign('pay_online', $pay_online);
     }
     if (!empty($order['shipping_name'])) {
         $order['shipping_name'] = trim(stripcslashes($order['shipping_name']));
     }
     // 货到付款不显示
     if ($payment['pay_code'] != 'balance') {
         /* 生成订单后,修改支付,配送方式 */
         // 支付方式
         $payment_list = model('Order')->available_payment_list(0);
         if (isset($payment_list)) {
             foreach ($payment_list as $key => $payment) {
                 /* 如果有易宝神州行支付 如果订单金额大于300 则不显示 */
                 if ($payment['pay_code'] == 'yeepayszx' && $total['amount'] > 300) {
                     unset($payment_list[$key]);
                 }
                 // 过滤掉当前的支付方式
                 if ($payment['pay_id'] == $order['pay_id']) {
                     unset($payment_list[$key]);
                 }
                 /* 如果有余额支付 */
                 if ($payment['pay_code'] == 'balance') {
                     /* 如果未登录,不显示 */
                     if ($_SESSION['user_id'] == 0) {
                         unset($payment_list[$key]);
                     } else {
                         if ($_SESSION['flow_order']['pay_id'] == $payment['pay_id']) {
                             $this->assign('disable_surplus', 1);
                         }
                     }
                 }
                 // 如果不是微信浏览器访问并且不是微信会员 则不显示微信支付
                 if ($payment['pay_code'] == 'wxpay' && !is_wechat_browser() && empty($_SESSION['openid'])) {
                     unset($payment_list[$key]);
                 }
                 // 兼容过滤ecjia支付方式
                 if (substr($payment['pay_code'], 0, 4) == 'pay_') {
                     unset($payment_list[$key]);
                 }
             }
         }
         $this->assign('payment_list', $payment_list);
         $this->assign('pay_code', 'no_balance');
     }
     // 如果是银行汇款或货到付款 则显示支付描述
     if ($payment['pay_code'] == 'bank' || $payment['pay_code'] == 'cod') {
         if (empty($order['pay_name'])) {
             $order['pay_name'] = trim(stripcslashes($payment['pay_name']));
         }
         $this->assign('pay_desc', $order['pay_desc']);
     }
     /* 订单信息 */
     $this->assign('order', $order);
     $this->assign('total', $total);
     $this->assign('goods_list', $cart_goods);
     $this->assign('order_submit_back', sprintf(L('order_submit_back'), L('back_home'), L('goto_user_center')));
     // 返回提示
     user_uc_call('add_feed', array($order['order_id'], BUY_GOODS));
     // 推送feed到uc
     unset($_SESSION['flow_consignee']);
     // 清除session中保存的收货人信息
     unset($_SESSION['flow_order']);
     unset($_SESSION['direct_shopping']);
     $this->assign('currency_format', C('currency_format'));
     $this->assign('integral_scale', C('integral_scale'));
     $this->assign('step', ACTION_NAME);
     $this->assign('title', L('order_submit'));
     $this->display('flow.dwt');
 }
开发者ID:noikiy,项目名称:shop-3,代码行数:101,代码来源:FlowController.class.php

示例4: done_receive


//.........这里部分代码省略.........
     /* 记录扩展信息 */
     if ($flow_type != CART_GENERAL_GOODS) {
         $order['extension_code'] = $_SESSION['extension_code'];
         $order['extension_id'] = $_SESSION['extension_id'];
     }
     $order['parent_id'] = 0;
     /* 插入订单表 */
     $error_no = 0;
     do {
         $order['order_sn'] = get_order_sn();
         // 获取新订单号
         $new_order = model('Common')->filter_field('order_info', $order);
         $this->model->table('order_info')->data($new_order)->insert();
         $error_no = M()->errno();
         if ($error_no > 0 && $error_no != 1062) {
             die(M()->errorMsg());
         }
     } while ($error_no == 1062);
     // 如果是订单号重复则重新提交数据
     $new_order_id = M()->insert_id();
     $order['order_id'] = $new_order_id;
     /* 插入订单商品 */
     $sql = "INSERT INTO " . $this->model->pre . "order_goods( " . "order_id, goods_id, goods_name, goods_sn, product_id, goods_number, market_price, " . "goods_price, goods_attr, is_real, extension_code, parent_id, is_gift, goods_attr_id) " . " SELECT '{$new_order_id}', goods_id, goods_name, goods_sn, product_id, goods_number, market_price, " . "goods_price, goods_attr, is_real, extension_code, parent_id, is_gift, goods_attr_id" . " FROM " . $this->model->pre . "cart WHERE session_id = '" . SESS_ID . "' AND rec_type = '{$flow_type}'";
     $this->model->query($sql);
     /* 如果使用库存,且下订单时减库存,则减少库存 */
     if (C('use_storage') == '1' && C('stock_dec_time') == SDT_PLACE) {
         model('Order')->change_order_goods_storage($order['order_id'], true, SDT_PLACE);
     }
     /* 减少礼包中的商品数 */
     if ($cart_goods[0]['goods_number']) {
         model('Order')->change_gift_storage($sn_id, $cart_goods[0]['goods_number']);
     }
     /* 插入日志 */
     $Gift = $this->model->table('gift_sn')->where("sn_id='" . $sn_id . "'")->find();
     if ($Gift['type'] == 1) {
         $data_l['type'] = 3;
     }
     $data_l['type'] = 2;
     $data_l['sn_id'] = $sn_id;
     $data_l['sn'] = $Gift['sn'];
     $data_l['create_user_id'] = $Gift['user_id'];
     $data_l['receive_user_id'] = $_SESSION['user_id'];
     $data_l['goods_id'] = $Gift['goods_id'];
     $data_l['goods_name'] = $Gift['goods_name'];
     $data_l['count'] = $cart_goods[0]['goods_number'];
     $data_l['time'] = gmtime();
     $data_l['order_id'] = $new_order_id;
     $this->model->table('gift_log')->data($data_l)->insert();
     /* 给商家发邮件 */
     /* 增加是否给客服发送邮件选项 */
     if (C('send_service_email') && C('service_email') != '') {
         $tpl = model('Base')->get_mail_template('remind_of_new_order');
         $this->assign('order', $order);
         $this->assign('goods_list', $cart_goods);
         $this->assign('shop_name', C('shop_name'));
         $this->assign('send_date', date(C('time_format')));
         $content = ECTouch::$view->fetch('str:' . $tpl['template_content']);
         send_mail(C('shop_name'), C('service_email'), $tpl['template_subject'], $content, $tpl['is_html']);
     }
     /* 如果需要,发短信 */
     if (C('sms_order_placed') == '1' && C('sms_shop_mobile') != '') {
         $sms = new EcsSms();
         $msg = $order['pay_status'] == PS_UNPAYED ? L('order_placed_sms') : L('order_placed_sms') . '[' . L('sms_paid') . ']';
         $sms->send(C('sms_shop_mobile'), sprintf($msg, $order['consignee'], $order['mobile']), '', 13, 1);
     }
     /* 如果需要,微信通知 by wanglu */
     if (method_exists('WechatController', 'do_oauth')) {
         $order_url = __HOST__ . url('user/order_detail', array('order_id' => $order['order_id']));
         $order_url = urlencode(base64_encode($order_url));
         send_wechat_message('order_remind', '', $order['order_sn'] . L('order_effective'), $order_url, $order['order_sn']);
     }
     // 销量
     model('Flow')->add_touch_goods($flow_type, $order['extension_code']);
     /* 记录供应商信息 */
     $sql = "update " . $this->model->pre . "order_goods og , " . $this->model->pre . "goods g set og.suppliers_id=g.suppliers_id\r\n            where og.goods_id=g.goods_id and og.order_id='" . $order['order_id'] . "'";
     $this->model->query($sql);
     /* 清空购物车 */
     model('Order')->clear_cart($flow_type);
     /* 清除缓存,否则买了商品,但是前台页面读取缓存,商品数量不减少 */
     clear_all_files();
     /* 插入支付日志 */
     $order['log_id'] = model('ClipsBase')->insert_pay_log($new_order_id, $order['order_amount'], PAY_ORDER);
     /* 订单信息 */
     $this->assign('order', $order);
     $total['amount_formated'] = "¥0.00元";
     $this->assign('total', $total);
     $this->assign('goods_list', $cart_goods);
     //$this->assign('order_submit_back', sprintf(L('order_submit_back'), L('back_home'), L('goto_user_center'))); // 返回提示
     user_uc_call('add_feed', array($order['order_id'], BUY_GOODS));
     // 推送feed到uc
     unset($_SESSION['flow_consignee']);
     // 清除session中保存的收货人信息
     unset($_SESSION['flow_order']);
     unset($_SESSION['direct_shopping']);
     $this->assign('currency_format', C('currency_format'));
     $this->assign('integral_scale', C('integral_scale'));
     $this->assign('step', ACTION_NAME);
     $this->assign('title', L('order_submit'));
     $this->display('flow.dwt');
 }
开发者ID:noikiy,项目名称:shop-3,代码行数:101,代码来源:ReceiveController.class.php


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