ecshop用户中心里的订单详情页显示缩略图

2016-07-07 14:55 来源:www.chinab4c.com 作者:ecshop专家

1.修正includes/lib_order.php
,找到order_goods
函数有些,大概在467行左右



$sql = "SELECT rec_id, goods_id, goods_name, goods_sn, market_price, goods_number
, " .

"goods_price, goods_attr
, is_real, parent_id, is_gift, " .

"goods_price * goods_number AS subtotal, extension_code " .

"FROM " . $GLOBALS['ecs']->table('order_goods') .

" WHERE order_id = '$order_id'";


替换为


$sql = "SELECT og.rec_id, og.goods_id, og.goods_name, og.goods_sn, og.market_price, og.goods_number, " ."og.goods_price, og.goods_attr, og.is_real, og.parent_id, og.is_gift, " ."og.goods_price * og.goods_number AS subtotal, og.extension_code,g.goods_thumb " . "FROM " . $GLOBALS['ecs']->table('order_goods') . " AS og "." LEFT JOIN ". $GLOBALS['ecs']->table('goods') . " AS g on og.goods_id=g.goods_id " . " WHERE order_id = '$order_id'";


2、修正

user_transaction.dwt
文件,



{$lang.goods_attr}
上面增加一行代码


缩略图

紧接着在

{$goods.goods_attr|nl2br}
上面增加一行代码


3、这样大概就可以了,以上第2步修正(模板修正)是在官方默许模板下进行的,如果您
运用的是其他模板,请对照着增加即可!

回答:
学习了 ,很好