网店插件,商品折扣显示方法
第一种
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里面的函数方法
{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}判断删除线效果图