您现在的位置是:首页 > 教程 > ecshop商城教程ecshop商城教程
ecshop商品详情页显示收藏数量的方法
涂翰毅2023-11-01 23:51:49ecshop商城教程已有人查阅
导读众所周知,很新版的商品详情页, 已经能够显示购买数量、评论数量了,但是唯独没有显示收藏数量,也就是淘宝上的收 气,下面我们就把它显示出来。
众所周知,很新版的商品详情页, 已经能够显示购买数量、评论数量了,但是唯独没有显示收藏数量,也就是淘宝上的收 气,下面我们就把它显示出来。
1)、首先打开/includes/lib_insert.php文件
在文件末尾增加下面代码
在
1)、首先打开/includes/lib_insert.php文件
在文件末尾增加下面代码
/**
* 调用某商品的累积收藏
*/
function insert_goods_collect($arr)
{
$sql='select count(user_id) as ids '.'from '. $GLOBALS['ecs']->table('collect_goods')."as co "."where co.goods_id=".$arr['goods_id'];
$row=$GLOBALS['db']->GetRow($sql);
if($row)
{
$ids = intval($row['ids']);
}
else
{
$ids = 0;
}
return $ids;
}
2)、接着打开模板文件/themes/default/goods.dwt ,这里以官方默认模板(2.7.2版)为例在
<strong>{$lang.goods_rank}</strong>
上边添加
<strong>收 气:</strong>{insert name='goods_collect' goods_id=$id}人<br>
本文标签:
很赞哦! ()
相关文章
- ecshop商品列表页面和商品页面自定义url网址前缀的实现方法
- ecshop商品页显示商品收藏数量怎么修改
- ecshop商品批发多属性多规格多库存怎么批量购买
- ecshop水印ecshop商品添加水印的实现方法
- ecshop商品价格将属性价格改为直接价非加价修改的方法
- ecshop商品页商品详细描述内容调用商品相册图片代码的方法
- ecshop商品图片模糊修改图片上传压缩质量的方法
- ecshop商品相册显示顺序为正序的修改方法
- ecshop商品售完商品库存为0显示商品售完已售罄的实现方法
- ecshop商品详情页相关属性商品由新到旧排序的方法
- ecshop商品页商品浏览次数怎样修改按倍数增加
- ecshop商品页面定制属性附件上传文件上传图片
随机图文
-
ecshop商城SEO优化,ecshop预防死链站内页面301跳转写法
ECSHOP商城SEO优化_ECSHOP预防死链,站内页面301跳转。ECSHOP站内页面跳转,避免死链2.x版本域名重定向: -
ecshop品牌列表页实现分页的方法
ECSHOP品牌列表页实现分页修改教程ECSHOP品牌列表页brand.php默认是没有分页的,如果品牌太多了,就不方便了。所以民能加上一个分页功能。 步 -
ecshop模板ie9下的切换选项卡不能切换的处理方法
ECSHOP模板ie9下的切换选项卡问题,不能切换的问题处理;IE9确实有这个问题在,IE10测试了下就没有这个问题。 -
ecshop微信token验证失败怎么办
客户在对接微信公众号时,微信公众号提交开发者时,提示token验证失败错误,下面请大家跟随ECSHOP代码号的技术学习一下测试处理方法:
留言与评论 (共有 条评论) |