ECSHOP用户中心我的订单列表中显示商品名称

2016-06-13 13:05 来源:www.chinab4c.com 作者:ecshop专家

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("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'].")");   然后在下面增加(红色部分为增加的内容)  $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 文件 在 {$lang.order_addtime} 的下面添加   商品名称   然后在 {$item.order_time} 的下面添加    {$item.goods_name}   清除缓存。