count|会员信息统计钩子

标签名称:count

功能说明:会员信息统计钩子

适用范围:全局

调用语法:<!--{countdata type="" mod="" value="" where=""}-->

基本参数:

参数名 数据类型 是否必须 描述 可选类型
type string Yes 统计类型 目前只支持:商家(shop)、会员(user)、系统(system)
mod string Yes 统计模块 system类型:会员(user)、商家(shop)、文章(article)、系统消息(systemmsg)
留言(words)、评价(comment)、婚纱摄影套系(wedpackage)、自主婚车(car)
婚车套餐(carpackage)、婚礼策划套系(theme)、婚礼定制(marrydiy)
婚车预约总数(carbespoke)、酒店预约(hotelbespoke)、酒店宴会厅(hotelhall)
主题预约(themebespoke)、婚礼人预约(kingkongbespoke)、订单(order)
婚纱预约(wedbespoke)、订单总额(ordersum)、在线支付总额(payordersum)
shop类型:站内消息(msg)、婚纱摄影套系(wedpackage)、供应商品(supgoods)
婚纱摄影套系图集(wedgallery)、婚纱摄影套系视频(wedvideo)、订单(order)
自主婚车(car)、婚车套餐(carpackage)、婚车图集(cargallery)、宴会厅(hotelhall)
婚礼策划(theme)、婚礼策划图集(themegallery)、菜谱(hotelmenu)
评论(comment)、通用图集(shopgallery)、通用视频(shopvideo)
user类型:站内消息(msg)、订单(order)、购物车(cart) 、我的收藏(collects)
value int No 当前会员ID、商家ID 调用商家类型或会员类型时才使用该参数
where string No 查询条件 SQL查询条件语句,查询条件请参考对应模块数据表字段

标签实例:

显示当前登录会员统计信息
未读信件:<!--{countdata type="user" mod="msg" value=$login.user.userid where="readflag=0"}-->
已读信件:<!--{countdata type="user" mod="msg" value=$login.user.userid where="readflag=1"}-->
订单条数:<!--{countdata type="system" mod="order" where="v.parentid='0' AND v.userid='<!--{$login.user.userid}-->'"}-->
购物车条数:<!--{countdata type="user" mod="cart" value=$login.user.userid}-->

显示当前登录商家统计信息
未读信件:<!--{countdata type="shop" mod="msg" value=$login.shop.shopid where="readflag=0"}-->
已读信件:<!--{countdata type="shop" mod="msg" value=$login.user.shopid where="readflag=1"}-->
婚纱摄影套系:<!--{countdata type="shop" mod="wedpackage" value=$login.user.shopid}-->
订单条数:<!--{countdata type="shop" mod="order" value=$login.user.shopid}-->

显示当前系统统计信息
在线支付总额:<!--{countdata type="system" mod="payordersum" where="v.paystatus=10"}-->
订单总数:<!--{countdata type="system" mod="order"}-->
商家会员:<!--{countdata type="system" mod="shop"}-->
个人会员:<!--{countdata type="system" mod="user" where="shopid=0"}-->