您现在的位置是:首页 > cms教程 > Ecshop商城教程Ecshop商城教程
ecshop会员中心增加订单搜索功能
梁胤鸣2025-01-08Ecshop商城教程已有人查阅
导读在user.php中的act=order_list中增加以下程序。在分页模板中,传递要查询的参数。2:模板中增加以下程序。用于搜索表单
在user.php中的act=order_list中增加以下程序。
2:模板中增加以下程序。用于搜索表单
$order_sn = isset($_REQUEST['order_sn'])?$_REQUEST['order_sn']:'';
$consignee = isset($_REQUEST['consignee'])?$_REQUEST['consignee']:'';
$start_date = isset($_REQUEST['start_date'])?$_REQUEST['start_date']:'';
$end_date = isset($_REQUEST['end_date'])?$_REQUEST['end_date']:'';
$pay_status = isset($_REQUEST['pay_status'])?$_REQUEST['pay_status']:'';
$shipping_status = isset($_REQUEST['shipping_status'])?$_REQUEST['shipping_status']:'';
$order_status = isset($_REQUEST['order_status'])?$_REQUEST['order_status']:'';
$where ="";
if($order_sn){
$where.=" and order_sn ='$order_sn'";
}
if($consignee){
$where.=" and consignee = '$$consignee'";
}
if($start_date){
$t = strtotime($start_date);
$where.=" and add_time >= $t";
}
if($end_date){
$t = strtotime($end_date);
$where.=" and add_time <= $t";
}
if($pay_status && $pay_status!= '-1'){
$where.=" pay_status = '$pay_status'";
}
if($shipping_status && $shipping_status!= '-1'){
$where.=" and shipping_status = '$shipping_status'";
}
if($order_status && $order_status!= '-1'){
$where.=" and order_status = '$order_status'";
}
$record_count = $db->getOne("SELECT COUNT(*) FROM " .$ecs->table('order_info'). " WHERE user_id = '$user_id' $where");
$pager = get_pager('user.php', array('act' => $action,'order_status'=>$order_status,'order_sn'=>$order_sn,'consignee'=>$consignee,'start_date'=>$start_date,'end_date'=>$end_date,'pay_status'=>$pay_status,'shipping_status'=>$shipping_status), $record_count, $page);
$orders = get_user_orders($user_id, $pager['size'], $pager['start']);
$merge = get_user_merge($user_id);
$smarty->assign('os_list', get_status_list('order'));
$smarty->assign('ps_list', get_status_list('payment'));
$smarty->assign('ss_list', get_status_list('shipping'));
$smarty->assign('merge', $merge);
$smarty->assign('pager', $pager);
$smarty->assign('orders', $orders);
$smarty->display('user_transaction.dwt');
在分页模板中,传递要查询的参数。2:模板中增加以下程序。用于搜索表单
<link href="js/calendar/calendar.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/calendar.php"></script>
<tr align="center">
<td bgcolor="#ffffff"><div align="left">订单编号
<input type="hidden" name="act" value="order_list">
<input type="text" name="order_sn"><br>
收货人姓名
<input type="text" name="consignee">
<br>
下单时间 <input name="start_date" value="{$start_date}" style="width:80px;" onclick="return showCalendar(this, '%Y-%m-%d', false, false, this);" />
-
<input name="end_date" value="{$end_date}" style="width:80px;" onclick="return showCalendar(this, '%Y-%m-%d', false, false, this);" />
<br>
订单状态: <select name="order_status" id="select9">
<option value="-1">请选择</option>
{html_options options=$os_list selected=-1}
</select>
付款状态: <select name="pay_status" id="select11">
<option value="-1">请选择</option>
{html_options options=$ps_list selected=-1}
</select>
发货状态: <select name="shipping_status" id="select10">
<option value="-1">请选择</option>
{html_options options=$ss_list selected=-1}
</select> <input type="submit" value="搜索"></div></td>
</tr>
3:将以下搜索条件加到搜索函数中去。在includes/lib_transaction.php中ecshop函数get_user_orders()中
$order_sn = isset($_REQUEST['order_sn'])?$_REQUEST['order_sn']:'';
$consignee = isset($_REQUEST['consignee'])?$_REQUEST['consignee']:'';
$start_date = isset($_REQUEST['start_date'])?$_REQUEST['start_date']:'';
$end_date = isset($_REQUEST['end_date'])?$_REQUEST['end_date']:'';
$pay_status = isset($_REQUEST['pay_status'])?$_REQUEST['pay_status']:'';
$shipping_status = isset($_REQUEST['shipping_status'])?$_REQUEST['shipping_status']:'';
$order_status = isset($_REQUEST['order_status'])?$_REQUEST['order_status']:'';
$where ="";
if($order_sn){
$where.=" and order_sn ='$order_sn'";
}
if($consignee){
$where.=" and consignee = '$$consignee'";
}
if($start_date){
$t = strtotime($start_date);
$where.=" and add_time >= $t";
}
if($end_date){
$t = strtotime($end_date);
$where.=" and add_time <= $t";
}
if($pay_status && $pay_status!= '-1'){
$where.=" pay_status = '$pay_status'";
}
if($shipping_status && $shipping_status!= '-1'){
$where.=" and shipping_status = '$shipping_status'";
}
if($order_status && $order_status!= '-1'){
$where.=" and order_status = '$order_status'";
}
本文标签:
很赞哦! ()
上一篇:ecshop后台菜单怎么添加
下一篇:ecshop lib_*函数列表
相关教程
- ecshop会员添加权限不允许看到其他会员信息
- ecshop会员怎么整合UC
- ecshop会员登陆后可见价格,ecshop会员登陆后显示价格实例
- ecshop会员中心我的收藏的商品图片和时间怎么修改
- ecshop会员列表,ecshop会员资料使用说明
- ecshop在线调查,ecshop会员访问在线调查
- ecshop会员等级,ecshop会员注册等级
- ecshop会员价格登陆才显示和只显示和自己等级相符合的价格
- ecshop会员注册成功以后自动升级为对应会员等级实例教程
- ecshop会员注册订单分成推荐设置说明教程
- ecshop导出会员,ecshop会员批量导出邮箱教程
- ecshop会员登录赠送等级积分和消费积分插件
图文教程
ecshop用户选择不同支付方式享受不同折扣的实现方法
修改ecshop让用户选择不同支付方式享受不同折扣,ECSHOP模板提供该ECSHOP教程:找到需要修改的文件:
ecshop后台怎么添加搜索功能
目前后台按照我们自身的需求便于管理可能要加搜索功能,比如供货商列表,如果信息太多的话加个搜索会更方便些,当然如果有基础的网友不用看此贴直接模仿官方有搜索模块的就成
ecshop品牌列表页实现分页的方法
ECSHOP品牌列表页实现分页修改教程ECSHOP品牌列表页brand.php默认是没有分页的,如果品牌太多了,就不方便了。所以民能加上一个分页功能。 步
ecshop用户中心查看订单页面怎么显示商品缩略图
用户中心 >> 我的订单 >> 查看订单详细,要如何加入商品缩略图呢?1、修改 includes/lib_order.php ,找到 order_goods 函数部分,大概在467行左右
相关源码
-
(自适应响应式)html5蓝色智能水表营销型网站pbootcms模板下载PbootCMS内核开发,为智能水表企业打造的营销型网站解决方案,本模板基于PbootCMS内核开发,为智能水表及相关行业企业设计,采用HTML5+CSS3技术构建,具有响应式布局。查看源码 -
(PC+WAP)货运物流快递仓储货架pbootcms网站模板下载本模板基于PbootCMS开发,为货运物流、快递配送、仓储货架等行业设计,支持PC+WAP自适应,确保在电脑、手机、平板等设备上均能流畅访问。适用于物流公司、仓储企业查看源码 -
pbootcms模板(自适应)花店鲜花花卉园艺网站源码一款基于PbootCMS内核开发的花店鲜花配送与花卉园艺企业网站模板。该模板采用响应式设计,自动适配手机、平板等移动设备,确保用户在任何设备上都能获得优质浏览体验。查看源码 -
pbootcms网站网络公司个人作品展示类网站源码(自适应)为网站建设公司、网络服务企业打造的响应式门户解决方案,基于PbootCMS内核深度开发。采用前沿自适应架构,无缝适配手机端交互与PC端展示需求。查看源码 -
(自适应)摄像头安防电子设备pbootcms源码下载本模板基于PbootCMS系统开发,为安防电子设备企业设计,特别适合监控摄像头、安防系统等产品的展示。采用响应式技术,确保各类设备参数和功能在不同终端上都能清晰呈现。查看源码 -
帝国cms7.5手游评测资讯礼包合集游戏专区下载网站模板本模板基于帝国CMS系统开发,为手游门户网站设计。支持PC端与移动端同步生成HTML静态页面,内置多端同步生成功能。模板架构针对手业特点优化,满足APP下载、游戏资讯、攻略等内容发布需求。查看源码
| 分享笔记 (共有 篇笔记) |
