业务经理

微信扫描以上二维码

028-61286886

技术咨询

网店插件,首页列表页显示商品折扣方法

迅睿框架 更新 2026-04-19 20:58:33 又菜又爱玩

网店插件,商品折扣显示方法

第一种

https://www.xunruicms.com/wenda/61986.html

第二种

 {php $rt = \Phpcmf\Service::M('order', 'store')->get_goods_discount($rs.id, $rs.price, $member);}
                                        {if $rt}
                                        <span class="meta-shhop-icon">
                                            <strong style="margin-right: 5px;">
                                            {$rt.info}
                                            </strong>
                                            <del><i class="fa fa-rmb"></i> {number_format($rs.price, 2)}</del>
                                            </span>
                                        {else}
                                        <span class="meta-shhop-icon"><i class="fa fa-rmb"></i> {number_format($rs.price, 2)}</span>
                                        {/if}

第二种简单 只需要套一个if else 即可,是调用order.php里面的函数方法


方案

  • 小五哥 #1 · 2023-03-02 08:54:02
    看看是什么代码,有用
  • 又菜又爱玩 #2 · 2023-03-02 09:22:21
    {if $rt.promotion.type==4||$rt.promotion.type==5}
                                               <i class="fa fa-rmb"></i> {number_format($rs.price, 2)}
                                                {else}
                                                 <del><i class="fa fa-rmb"></i> {number_format($rs.price, 2)}</del>
                                                {/if}
    判断删除线
    效果图
    image
  • 魂 #3 · 2025-03-30 06:37:39
    看看怎么实现的
  • 四分音符 #4 · 2025-09-13 23:07:33
    看看怎么实现的
  • 淇云科技 #5 · 2026-01-21 20:42:18
    看看怎么实现的
  • 39884895 #6 · 2026-04-19 20:58:33
    看看怎么实现的

迅睿系统漏洞

百度AI批量检测敏感词
百度AI批量检测敏感词(2026-10-26)
优化长任务超时问题
泛解析站群系统
泛解析站群系统(2026-10-26)
添加子站时设置模板
GEO系统
GEO系统(2026-10-26)
修复抖音图文会话不持久:扩大 Cookie 域、会话 Cookie ...
APP消息推送
APP消息推送(2026-10-26)
增加自动推送任务的删除功能 增加推送内容显示函数(避免内容过长的显...
GeoSeo收录宝
GeoSeo收录宝(2026-10-25)
优化插件日志等小细节 1 优化 爬虫监控月统计超200万数据容易...
迅睿工具箱
迅睿工具箱(2026-10-24)
修正页面显示样式
秒变内部站
秒变内部站(2026-10-23)
全站只有管理员身份可以访问