在根目录的goods.php的$smarty->assign('goods_rank', get_goods_rank($goods_id)); // 商品的销售排名
下面添加以下代码
代码如下:
$smarty->assign('comments_latest', get_latest_comment(10)); //获取最新品论
$smarty->assign('comments_latest', get_latest_comment(10)); //获取最新品论
第三步:
在library目录下创建comments_latest.lbi文件
第四步:
在模板文件goods.dwt中使用以下代码即可在商品详情页面中调用“最新评论”
代码如下:
<!-- #BeginLibraryItem "/library/comments_latest.lbi" --><!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/comments_latest.lbi" --><!-- #EndLibraryItem -->
更多ECSHOP内容来自木庄网络博客
标签:ECSHOP
相关阅读 >>
ECSHOP 后台登陆自动退出的一种可能情况(目录大小写问题)
更多相关阅读请进入《ECSHOP》频道 >>
相关推荐
评论
管理员已关闭评论功能...
- 欢迎访问木庄网络博客
- 可复制:代码框内的文字。
- 方法:Ctrl+C。