1.打开includes/lib_transaction.php的文件,找到get_user_orders的函数
在
$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']);
的上面加上查询商品名称代码:
$row['goods_name'] =$GLOBALS['db']->getOne("sel ect goods_name from".
$GLOBALS['ecs']->table("goods").
"where goods_id =(sel ect min(goods_id)from".
$GLOBALS['ecs']->table("order_goods").
"whereorder_id=".$row['order_id'].")");
然后在下面增加(红色部分为增加的内容)
$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'],
'goods_name' =>$row['goods_name']
);
2.打开模板文件 /themes/default/user_transaction.dwt 文件
在
<tdbgcolor="#F2F2F2">{$lang.order_addtime}</td>
的下面添加
<tdbgcolor="#F2F2F2">商品名称</td>
然后在
<td align="center"bgcolor="#ffffff">{$item.order_time}</td>
的下面添加
<td align="center"bgcolor="#ffffff">{$item.goods_name}</td>