ECSHOP 用户中心 我的订单前台显视订单每张商品图片及收货人
先在网站根目录打开文件 includes/lib_transaction.php
查找代码 $sql = "SELECT order_id, order_sn, order_status, shipping_status, pay_status, add_time, " .
修改成 $sql = "SELECT order_id, order_sn, order_status, shipping_status,consignee, pay_status, add_time, " .
继续查找代码 $row['order_status'] = $GLOBALS['_LANG']['os'][$row['order_status']] . ',' . $GLOBALS['_LANG']['ps'][$row['pay_status']] . ',' . $GLOBALS['_LANG']['ss'][$row['shipping_status']];
在下面添加代码
$row['goods_name'] =$GLOBALS['db'] ->getOne("select goods_name from". $GLOBALS['ecs']->table("goods"). "where goods_id =(select min(goods_id) from". $GLOBALS['ecs']->table("order_goods"). "where order_id=".$row['order_id'].")"); $row['goods_id'] =$GLOBALS['db'] ->getOne("select goods_id from". $GLOBALS['ecs']->table("goods"). "where goods_id =(select min(goods_id) from". $GLOBALS['ecs']->table("order_goods"). "where order_id=".$row['order_id'].")"); $row['goods_thumb'] =$GLOBALS['db'] ->getOne("select goods_thumb from". $GLOBALS['ecs']->table("goods"). "where goods_id =(select min(goods_id) from". $GLOBALS['ecs']->table("order_goods"). "where order_id=".$row['order_id'].")");
再继续查找 $arr[] = array('order_id' => $row['order_id'],
在下面增加代码 'pay_status' => $row['pay_status'],
再继续查找代码 'handler' => $row['handler']
修改成
'handler' => $row['handler'], 'goods_name' => $row['goods_name'], 'goods_thumb' => $row['goods_thumb'], 'goods_id' => $row['goods_id'], 'consignee' => $row['consignee'] );
再打开模板文件:user_transaction.dwt
查找代码 <td bgcolor="#ffffff">{$lang.order_addtime}</td>
在上面增加代码
<td bgcolor="#ffffff">订单图片</td> <td bgcolor="#ffffff">收货人</td>
再继续查找代码 <td align="center" bgcolor="#ffffff">{$item.order_time}</td>
在上面增加代码
<td align="center" bgcolor="#ffffff"><a href="user.php?act=order_detail&order_id={$item.order_id}"><img src="{$item.goods_thumb}" width="50" border="0"/></a></td> <td align="center" bgcolor="#ffffff">{$item.consignee}</td>
这样就可以了,到后台清除下缓存,刷新下。
在订单页里显视订单商品图片 http://www.cnblogs.com/wangblognet/archive/2012/12/15/2818928.html
源厂制造10-10000级洁净无尘车间防静电防尘用品!网址:http://www.lgfjd.com 微信号:614412
posted on 2013-02-23 11:46 ECshop商城二次开发博客 阅读(1695) 评论(0) 编辑 收藏 举报