微擎人人商品详情页显示多规格商品的会员专享价格区间

基于之前分享过的修改商品会员专享价格,已经有了 $memberprice 参数,本文主要是修改一下商品详情页显示多规格商品的会员专享价格区间

下图是修改后的效果。

打开

ewei_shopv2/template/mobile/default/goods/detail.html

搜索如下代码段

<!--基础价格-->
{if $goods['minprice']==$goods['maxprice']}
    {$goods['minprice']}
{else}
    {$goods['minprice']}~{$goods['maxprice']}
{/if}

直接替换为

{$memberprice}

接着搜索如下代码段,或者搜索关键词 original

<!--促销-->
{if $goods['isdiscount'] && $goods['isdiscount_time']>=time()}
     <span class="original">¥{$goods['productprice']}</span>
{else}
    {if $goods['productprice']>0}
        <span  class="original">¥{$goods['productprice']}</span>
    {/if}
{/if}

替换为:

<!--促销-->
{if $goods['isdiscount'] && $goods['isdiscount_time']>=time()}
    <!--<span class="original">¥{$goods['productprice']}</span>-->
    <span class="original">¥
        {if $goods['minprice']==$goods['maxprice']}
            {$goods['minprice']}
        {else}
            {$goods['minprice']}~{$goods['maxprice']}
        {/if}
    </span>
{else}
    {if $goods['productprice']>0}
        <!--<span class="original">¥{$goods['productprice']}</span>-->
        <span class="original">¥
            {if $goods['minprice']==$goods['maxprice']}
                {$goods['minprice']}
            {else}
                {$goods['minprice']}~{$goods['maxprice']}
            {/if}
        </span>
    {/if}
{/if}

至此结束,禁止转载。

参与评论

游客评论不支持回复他人评论内容,如需回复他人评论内容请