$row['sheng_price'] = $row['market_price']-$row['shop_price'];
$row['zhekou_price'] = round(($row['shop_price']/$row['market_price'])*100)/10+””;
$row['cuxiao_sheng_price'] = $row['market_price']-$row['promote_price'];
$row['cuxiao_zhekou_price'] = round(($row['promote_price']/$row['market_price'])*100)/10+””;

(想要在商品详情页添加促销价的折扣和节省的自己再如法炮制一段添加其后就可以了)

到goods.dwt中找到市场价和促销价那一栏后面添加(当然你想添加什么地方都可以,看你自己感觉怎么美观了):

折扣:{$goods.zhekou_price} 折  节省:{$goods.sheng_price} 元
促销期间折扣:{$goods.cuxiao_zhekou_price} 折  节省:{$goods.cuxiao_sheng_price} 元。


更多



分类: 技术交流

评论