梦dedecms订单列表导出到excel表教程
梦dedecms订单列表导出到excel表教程
使用说明
可选择导出指定的织梦订单,不选就是导出全部
导出的excle文件按当前时间命名
导出的excel文件请用wps软件打开
更多精彩就在: 51免费论文网|www.jxszl.com
,office软件下可能会乱码
I..打开/dede/shops_operations.php找到
elseif($dopost==delete)
在它上面加入
elseif($dopost==out)
{
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=".date("Y-m-d-H-i-s").".xls");
echo"
订单号 | ";商品名称 | ";单价(元/单位) | ";数量 | ";支付方式 | ";配送费 | ";购买时间 | ";收货人 | ";地址 | ";邮编 | ";联系电话 | ";邮箱 | ";留言 | ";合计(元) | ";状态 | ";
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
".$arr[oid]." | ";//订单号".$arr[title]." | ";//商品名称".$arr[uprice]." | ";//单价".$arr[cartcount]." | ";//数量www.dedeVVIII.com".GetsType($arr[paytype])." | ";//支付方式".$arr[dname]."费用:".$arr[dprice]."元 | ";//配送费".GetDateTimeMk($arr[stime])." | ";//购买时间".$arr[consignee]." | ";//收货人".$arr[address]." | ";//地址".$arr[zip]." | ";//邮编".$arr[tel]." | ";//联系电话".$arr[email]." | ";//邮箱".$arr[des]." | ";//留言".$arr[priceCount]." | ";//合计".GetSta($arr[state])." | ";//状态
exit();
}
II.打开/dede/shops_operations.htm找到
在它下面加入
继续找到
functionPushSel(){
在它上面加入
functionOutSel()
{
varnid=getCheckboxItem();
location.href="shops_operations.php?dopost=out&nid="+nid;
}
完成,看清楚教程,有的是在下面加入有的是在上面加入的.
原文链接:http://www.jxszl.com/biancheng/dedecms/74767.html