用户中心 >> 我的订单 >> 查看订单详细,要如何加入商品缩略图呢??" ^/ P3 l* e4 v9 C& t/ i6 x
1、修改 includes/lib_order.php ,找到 order_goods 函数部分,大概在467行左右, C, t0 m' E- g9 g! ~
将5 h/ c. X1 K# Z6 ]* p
( s6 p/ g. J/ a4 l4 U
$ b& V& P; B0 I0 I9 S B
$sql = "SELECT rec_id, goods_id, goods_name, goods_sn, market_price, goods_number, " .& @. h* u: q% o: o4 F% G* m( ]% K5 D
"goods_price, goods_attr, is_real, parent_id, is_gift, " .0 I+ c! a- ~. W& l4 a& W
"goods_price * goods_number AS subtotal, extension_code " .. z( L5 r$ `8 q: W! f
"FROM " . $GLOBALS['ecs']->table('order_goods') .
4 L7 |6 n+ S* ~# [- g3 X0 t6 V " WHERE order_id = '$order_id'"; |
* H5 @4 u; Z$ C替换为
' D) K9 Q) T+ {
5 k" S. n& Y8 {3 H! x$sql = "SELECT og.rec_id, og.goods_id, og.goods_name, og.goods_sn, og.market_price, og.goods_number, " .
# ?7 u# x3 T0 F# f- d "og.goods_price, og.goods_attr, og.is_real, og.parent_id, og.is_gift, " .
0 `2 G8 b4 t' W "og.goods_price * og.goods_number AS subtotal, og.extension_code,g.goods_thumb " .( [7 d$ a6 W9 _$ n% m! ]
"FROM " . $GLOBALS['ecs']->table('order_goods') . " AS og ".
/ d. }1 s8 v; g+ _2 R( I2 L " LEFT JOIN ". $GLOBALS['ecs']->table('goods') . " AS g on og.goods_id=g.goods_id " ., O0 y* n$ G9 u/ A9 Z8 Z) O1 g2 d
" WHERE order_id = '$order_id'"; |
# ^. T# P# b2 V$ Q( O) [
2、修改 user_transaction.dwt 文件,0 L! v, }5 w1 F' o0 d' N
在
/ y4 O% p1 x" x& y! O<th width="29%" align="center" bgcolor="#ffffff">{$lang.goods_attr}</th>
% n% R1 K$ F& E) Q% B @上面增加一行代码8 ?# x# a9 ] J' J
<th align="center" bgcolor="#ffffff">缩略图</th> 紧接着在
* ]0 s' @( |0 H8 I2 n- o1 t- c" W1 U<td align="left" bgcolor="#ffffff">{$goods.goods_attr|nl2br}</td>
2 L2 n$ W8 a4 [9 ?上面增加一行代码
j# L I& L" G! V2 N1 S5 f<td align=center bgcolor="#ffffff"><img src="/{$goods.goods_thumb}" ></td>7 Y8 _9 u0 n" e: x
3、这样应该就可以了,以上第2步修改(模板修改)是在官方默认模板下进行的,如果您使用的是其他模板,请对照着添加即可! 4 o B ?6 B- b8 z& o, `
|