1、
8 e; q" ]& H1 N# J4 z) d% C3 A5 j先打开 includes/lib_order.php 文件(建议使用editplus)
3 W" k/ r/ V/ Z8 B# A+ n$ x找到 (大概是在873行)$arr[$key]['formated_subtotal'] = price_format($value['subtotal'], false); | + X. Q" J. h7 _' N. j
在它的下面增加以下代码 2 W s. g% g; B. x7 L' ^& X% F* z* E
$sql="select brand_name from ".$GLOBALS['ecs']->table('goods')." g left join " . $GLOBALS['ecs']->table("brand") . " b on g.brand_id=b.brand_id where goods_id='{$value['goods_id']}'";2 T* [) ?; V6 i
$goods_brand = $GLOBALS['db']->getOne($sql);
7 u. D# o) @, b# j u0 Z $arr[$key]['goods_brand']=$goods_brand; |
5 _% _ l6 u; ~5 e1 i2、# z/ u4 f6 |- a; `
下面这一步千万要认真,不能马虎,还是在includes/lib_order.php 文件中查找4 O8 \: a5 D* I" C, \5 ?
先找到 get_cart_goods() 函数部分,然后再找到此函数中的一行代码(注:此行代码在includes/lib_order.php中出现了两次,千万别找错了): D9 \4 p$ ]* B. M4 Z6 c* q
- Q: R- O: G6 G9 b. m! c" K1 P6 ]# h
找到这行代码后,在它上面增加以下代码$sql="select brand_name from ".$GLOBALS['ecs']->table('goods')." g left join " . $GLOBALS['ecs']->table("brand") . " b on g.brand_id=b.brand_id where goods_id='{$row['goods_id']}'";$ A6 w4 C, o9 z
$goods_brand = $GLOBALS['db']->getOne($sql);+ |. i7 [. G# P: I: u; L5 x$ r
$row['goods_brand']=$goods_brand; | 9 z1 P& x5 T3 ~8 M6 S1 s4 {
2、. U( D/ }" Y- V y& u$ T5 p9 h
修改 模板文件 flow.dwt 文件- I1 {/ `1 B" v# p* E3 ~
找到<!-- {if $goods.is_shipping} -->(<span style="color:#FF0000">{$lang.free_goods}</span>)<!-- {/if} --> | % y9 d" V2 a1 H3 m+ c
在他后面增加代码: u {" l6 Y0 H; V6 z) K
{$goods.goods_brand}) W* x4 F! p! ?
7 d# I) {8 I- J0 ^( Y
找到<a href="goods.php?id={$goods.goods_id}" target="_blank"><img src="{$goods.goods_thumb}" border="0" title="{$goods.goods_name|escape:html}" /></a><br /> |
+ T4 T3 G2 [- r9 X5 | |在它后面增加代码
+ I/ l Q: I0 J/ J/ {, X(品牌:{$goods.goods_brand})
. H# P, b; [8 { |