在ecshop用户中心我的订单列表中显示商品缩略图

在/includes/lib_transaction.php找到

1
2
3
4
5
6
$arr\[\] = array(
'order\_id'       => $row\['order\_id'\],
'order\_sn'       => $row\['order\_sn'\],
'order\_time'     => local\_date($GLOBALS\['\_CFG'\]\['time\_format'\], $row\['add\_time'\]), 'order\_status'   => $row\['order\_status'\],
'total\_fee'      => price\_format($row\['total\_fee'\], false),
'handler'        => $row\['handler'\]);


修改为
1
2
3
4
5
6
$arr\[\] = array(
'order\_id'       => $row\['order\_id'\],
'order\_sn'       => $row\['order\_sn'\],
'order\_time'     => local\_date($GLOBALS\['\_CFG'\]\['time\_format'\], $row\['add\_time'\]), 'order\_status'   => $row\['order\_status'\],
'total\_fee'      => price\_format($row\['total\_fee'\], false),
'handler'        => $row\['handler'\], 'thumb'          => $row\['thumb'\]);

并在其前面添加
1
$row\['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'\].")"); 

在themes/default/user_transaction.dwt中 找到
1
<td bgcolor="#ffffff">{$lang.order\_addtime}</td> 

在其前面添加
1
<td bgcolor="#ffffff">缩略图</td> 

再找到
1
<td align="center" bgcolor="#ffffff">{$item.order\_time}</td> 

在其前面添加
1
<td  align=center bgcolor="#ffffff"><img src="{$item.thumb}" class="img_sstb"/></td>