1、+ p" S7 W% P* D2 K" P
先打开 includes/lib_order.php 文件(建议使用editplus)
: ^9 x6 Z/ _4 N找到 (大概是在873行)$arr[$key]['formated_subtotal'] = price_format($value['subtotal'], false); |
( p! N+ h2 P5 n$ A* ^9 [, ~在它的下面增加以下代码
* R+ L7 V, {' P) q: n$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']}'";" Z7 Q% G: h3 o, V" I# }2 n% B
$goods_brand = $GLOBALS['db']->getOne($sql);6 L1 E$ @- H: X( N% N$ e
$arr[$key]['goods_brand']=$goods_brand; |
6 @& B" \. p `2、
( {" F0 ]7 ]9 `* C下面这一步千万要认真,不能马虎,还是在includes/lib_order.php 文件中查找
( Y, J7 F3 @* g( J先找到 get_cart_goods() 函数部分,然后再找到此函数中的一行代码(注:此行代码在includes/lib_order.php中出现了两次,千万别找错了) r' v5 @& ] W9 B' p
# Y5 W, ]/ j) n" G" |* w# A/ `
2 j) q) Q. v3 {: ]8 C, _找到这行代码后,在它上面增加以下代码$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']}'";( J# l1 q1 O7 }+ c' u% W* D
$goods_brand = $GLOBALS['db']->getOne($sql);
/ p- r/ m2 @6 x% {) D0 I+ J1 f $row['goods_brand']=$goods_brand; | ) `5 Q. j: A$ W. o2 `7 H
2、/ S1 h1 L; C$ Y* P+ z @
修改 模板文件 flow.dwt 文件. J) t" Y8 m. k0 A; \& C6 W; L% h
找到<!-- {if $goods.is_shipping} -->(<span style="color:#FF0000">{$lang.free_goods}</span>)<!-- {/if} --> | ' q1 s( X3 I3 m! }3 [
在他后面增加代码- r( K* ~( o M b) H. U% x
{$goods.goods_brand}: l( j8 y. s. ^
* M% t7 L# F7 J9 n! z$ w$ n
找到<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 /> | 6 W$ c( M6 \4 @! ~
在它后面增加代码9 W: h( W- r6 V$ X
(品牌:{$goods.goods_brand})
$ I O& ^, }# c5 n) ~+ a9 U |