问题:/ G1 d7 H6 G8 x/ N8 J
0 g b1 P0 a! T( F0 J我想将后台编辑商品时录入的“商家备注”信息显示在ECSHOP商城首页的“精品推荐/新品上市/热卖商品”几个栏目里,请问需要怎么修改呢??( m- l6 a6 T& p x% R" w1 f% k7 T5 ]. R
0 x, S$ J2 N) Y/ K3 l/ q/ I- \
* N* }! o9 G3 x5 \9 e {) e+ h n, {; q- E$ K& M
修改方法:
& w2 S+ u, K, S" L# T0 j% v# L) \3 Q- F1 b- t: W& }
1、修改 /includes/lib_goods.php 文件 (最好使用editplus)
, g. p* V' m' l! h- A
1 V# Y$ a$ ?7 o( ]# ^将3 E: @! y( w! C
"promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, g.goods_img, RAND() AS rnd " . |
9 k: c3 T) t6 T3 W, Q, H5 S$ `修改为# m9 R% p) `4 r" }% Q
"promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, g.goods_img,g.seller_note, RAND() AS rnd " . |
' t' H6 S& L, D( u" i' G, \# i& Z6 H接着,找到
$ w2 O: N7 k5 cif (in_array($row['goods_id'], $type_array['best'])) | . m* t$ v2 M* S8 k6 A+ I
在它上面加一行代码. v$ t3 v# v2 t% ~2 o/ \) K
$goods[$idx]['seller_note'] = $row['seller_note']; | 2 s+ c% p, m0 X: z4 V
2、7 f# \; \# f, }, r9 w. W: o
/ g2 r5 l1 o4 N下面修改ECSHOP模板文件,以官方默认模板为例(其他模板同理)2 S! t1 Y' J. A. E/ i6 [2 X1 b
/ D* S" R( X: f7 R3 n2 v1 h打开 /themes/default/library/recommend_best.lbi 文件0 a+ r1 C. y( w6 T- j
4 [" B) h5 @, t8 h+ U. a
在<p><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_style_name}</a></p> | ! K$ r# F5 g6 @, i& e" T+ t, h+ p
下面增加一行代码; Z5 z! x# q' Y# d
<p>{$goods.seller_note}</p> | 6 R/ \& E6 D5 A- k8 J
3、9 Z: c3 u' t; O# Z3 x# P
然后打开 /themes/default/library/recommend_hot.lbi 文件,修改方法同上3 _1 `; o: M$ G
8 w1 B2 Y. X! C
4、* f, S/ K. _. C
然后打开 /themes/default/library/recommend_new.lbi 文件,修改方法同上6 \" f4 h" @* [* H
|