标题大家都能看明白吧,那就不多说了,下面是教程:9 ~& D. W. `0 G
4 s1 ]( i7 U" ^6 m" X
打开 /category.php 文件6 \. n! C$ }% q
找到, R! N1 y6 U* o) {( a" W
$sql = 'SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, ' . |
; j9 P4 [8 h' ]6 ]7 w, L/ R修改为$sql = 'SELECT g.goods_id, g.goods_name,g.goods_sn, g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, ' . |
/ p; D; O, B& M$ J/ E" e8 z继续往下找,找到
+ i" A. e: G5 q# M( h; R/ Z$arr[$row['goods_id']]['name'] = $row['goods_name']; |
2 e1 [: u. F0 s3 N在它下面添加* R( Q+ |7 e! r+ o
$arr[$row['goods_id']]['goods_sn'] = $row['goods_sn']; |
# h% z. ]! h, [然后就可以在模板文件中调用商品货号了,
8 c9 Z! A5 \# `/ ?6 ]打开模板文件 /themes/default/library/goods_list.lbi ,# K5 m* [; I5 v# G, T
调用方法如下:3 J. e0 ]7 I6 z( S/ Z# W
8 ?3 l3 q+ n8 l* }6 E{$lang.goods_sn}{$goods.goods_sn}" } z+ k1 T/ D. W5 F0 Q1 B
|