最土整合9赢cps接口
2011-06-23 16:50 来源:www.chinab4c.com 作者:ecshop专家
1:修改最土数据库
alter table `order` add column cps_type varchar(128) default '';
alter table `order` add column cps_value varchar(128) default '';
2:新建立cps接口文件
require_once(dirname(__FILE__) . '/app.php');
$u_id = $_REQUEST['uid'];
if (!empty($u_id))
{
setcookie('9ycps',$u_id,time()+3600*24*30);
}
if($url == ''){
$url = 'index.php';
}
header("Location:$url");
3:team/buy.php
$9ycps = $_COOKIE['9ycps'];
if(isset($9ycps)){
Table::UpdateCache('order',$order_id,array('cps_type'=>'9ycps'));
Table::UpdateCache('order',$order_id,array('cps_value'=>$9ycps));
}
4:增加查询接口
require_once(dirname(__FILE__) . '/app.php');
$condition['cps_type'] = '9ycps';
$orders = DB::LimitQuery('order', array(
'condition' => $condition,
'order' => 'ORDER BY team_id DESC, id ASC',
));
$team_ids = Utility::GetColumn($orders, 'team_id');
$teams = Table::Fetch('team', $team_ids);
foreach($teams AS $tid=>$one){
team_state($one);
$teams[$tid] = $one;
}
最近更新
常用插件
- ecshop二次开发首页显示购
ecshop二次开发首页显示购买记录插件,用图文的方式,来处理在首页显示...
- ecshop后台商品列表编辑属
ecshop后台商品列表编辑属性规格,这个功能十分重要,当我们在后台,录...
- ecshop2.7会员中心订单搜索
ecshop插件:主要是通过对ecshop2.7进行二次开发,调整了程序之后.你可...
- 查看ecshop推荐人列表插件
ecshop这个系统是有推荐功能的。就是注册推荐,商品地址的推荐.来完...
- ecshop批发选购插件
很多ecshop用户都用ecshop来做批发系统,当客人进入选购系统之后,他们...