最近看到有朋友有这方面的需求,就整理了一下,写出来,供有同样需求的朋友备用
7 X8 G1 `# z2 W# s
8 a3 j6 ]) N6 U) G2 J1、这里说的商品简单描述,不是商品的详细信息,而是后台编辑商品时在“其他信息”标签栏填写的那个“商品简单描述”,即goods_brief字段4 X. v: A$ o. G( a
, r& U3 [+ p; J# N* H2、修改lib_order.php文件的get_cart_goods()函数部分
' Q1 M/ C6 Z1 ]6 D# u+ ~+ i将 ( h, Y3 q2 C/ h5 K/ U
$goods_thumb = $GLOBALS['db']->getOne("SELECT `goods_thumb` FROM " . $GLOBALS['ecs']->table('goods') . " WHERE `goods_id`='{$row['goods_id']}'");
$ l. p1 l9 Y/ Y( u+ i$row['goods_thumb'] = get_image_path($row['goods_id'], $goods_thumb, true); | ' i( L3 I1 r `" H, k- |3 a
修改为
3 t$ ^5 L" X3 d( w2 \4 L9 _2 l7 o; R+ }$goods_thumb = $GLOBALS['db']->getRow("SELECT `goods_thumb`,`goods_brief` FROM " . $GLOBALS['ecs']->table('goods') . " WHERE `goods_id`='{$row['goods_id']}'");: P4 Z, a3 M7 f
$row['goods_thumb'] = get_image_path($row['goods_id'], $goods_thumb['goods_thumb'], true);
+ M* I ?4 F5 V* c. b1 U$row['goods_brief']=$goods_thumb['goods_brief']; | + P' K7 C/ a' r# k
3、在模板文件(flow.dwt)合适位置调用即可:
% k: l6 O$ q L& D t1 s' c{$goods.goods_brief} * d: Q* I J' H* I" O2 u9 b) D
|