ECSHOP首页今日特价促销商品增加促销倒计时效

2016-06-13 13:05 来源:www.chinab4c.com 作者:ecshop专家

效果如下 修改方法:  1、打开includes/lib_goods.php 找到get_promote_goods()函数部分,在   $goods[$idx]['url'] =build_uri('goods', array('gid' => $row['goods_id']),$row['goods_name']); 红字这行之后,添加如下代码(没有修改过的模板,大约在394行):   $time = gmtime(); if ($time >= $row['promote_start_date']&& $time <=$row['promote_end_date']) { $goods[$idx]['gmt_end_time'] = local_date('M d, YH:i:s',$row['promote_end_date']); } else { $goods[$idx]['gmt_end_time'] = 0; }   2、然后将 library/recommend_promotion.lbi 全部替换为下面代码:

{if $smarty.foreach.promotion_foreach.index <=3}

{$goods.short_name|escape:html}

{$lang.promote_price}{$goods.promote_price}
{$lang.please_waiting}
{/if}