在ECSHOP商品详细页显示折扣率或节省钱数

打开 includes\lib_goods.php 文件,找到$row['market_price']        = price_format($row['market_price']);在它上面添加:$row['sheng_price'] = $row['market_price']-$row['shop_price'];$row['zhekou_price'] = round(($row['shop_price']/$row['market_price'])*100);如果你的是UTF8编码的,最好是在EDITPLUS中编辑,不要直接在记事本中编辑。好了,接下来还需要修改下商品详情页模板,下面以官方默认模板为例。打开 goods.dwt 文件,找到{$goods.shop_price_formated},在它后面添加:折扣:{$goods.zhekou_price} 折 <br />节省:{$goods.sheng_price} 元如果你想显示的更好看点,自己再另外多写些CSS样式即可。转载注明出处

(0)

相关推荐