ecshop调用促销和最新属性商品
ecshop调用促销和最新属性商品
操作方法
- 01
代码如下: <!-- {if $promotion_goods and $new_goods} --> <script type="text/javascript" src="js/endTime.js"></script> <!--{foreach from=$promotion_goods key=key item=goods name="promotion_foreach"}--> {if $smarty.foreach.promotion_foreach.index == 0} <div class="us-layer-2"> <span class="us-l2-l"><a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}" width="553" /></a></span> <ul class="us-l2-r"> <li class="us-l2-r-t">距特卖结束:<samp id="leftTime{$key}">{$lang.please_waiting}</samp></li> <li class="us-l2-r-h">{$goods.brief|escape:html}</li> <li class="us-l2-r-c"><div>{$goods.promote_price}</div><a href="#"></a></li> <li class="us-l2-r-i"><span class="f_l">新品上线,赶快来试试吧!</span><span class="f_r"><font color="#b9966a" style="font-weight:bold;font-size:14px;">{$goods.buy_num}</font>人已经购买</span></li> </ul> <span class="us-l2-p"></span> </div> {/if} <script>Tday[{$key}] = new Date("{$goods.gmt_end_time}");setInterval("clock({$key})", 1000);</script> <!--{/foreach}--> <!-- {/if} --> 在对应模板里使用即可。