ECSHOP 用户中心 我的订单前台显视订单每张商品图片及收货人

it2022-05-06  5

先在网站根目录打开文件 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

 

转载于:https://www.cnblogs.com/wangblognet/archive/2013/02/23/2923294.html

相关资源:数据结构—成绩单生成器

最新回复(0)