ecshop 模板标签说明
周继平吧
全部回复
仅看楼主
level 7
周继平 楼主
商品关键字
{$keyword}
商品描述
{$description}
商店标题
{$page_title}
商店公告
{$shop_notice}
文章列表
<ul>
{foreach from=$new_articles item=article}
<li>{$article.short_title}//文章标题</li>
{/foreach}
</ul>
精品推荐商品列表
<ul>
{foreach from=$best_goods item=goods}
<li><a href="{$goods.url}//商品url">{$goods.short_name}//商品名称</a></li>
{/foreach}
</ul>
热销商品
<ul>
{foreach from=$hot_goods item=hot}
<li><a href="{$hot.url}//商品url"><img src="{$hot.thumb}//商品缩略图"><br />{$hot.short_style_name}//商品名称</a></li>
{/foreach}
</ul>
商品上市
<ul>
{foreach from=$new_goods item=new}
<li><a href="{$new.url}//商品url"><img src="{$new.thumb}//商品缩略图"><br />{$new.short_style_name//商品名称}</a></li>
{/foreach}
</ul>
分类列表/所有分类
{foreach from=$categories item=cat}
<dl>
<dt><a href="{$cat.url}//分类url">{$cat.name|escape:html}//分类名称</a></dt>
{foreach from=$cat.cat_id item=child}
<dd>
<a href="{$child.url}//子分类url">{$child.name|escape:html}//子分类名称</a>
<ul>
{foreach from=$child.cat_id item=childer}
<li><a href="{$childer.url}//子子分类url">{$childer.name|escape:html}//子子分类名称</a></li>
{/foreach}
</ul>
</dd>
{/foreach}
</dl>
{/foreach}
调用includes/lib_insert.php文件中的insert_cart_info函数,获取购物后结算信息
{insert name='cart_info'}
销售排行
{foreach name=top_goods from=$top_goods item=top}
<ul>
<img src="../images/top_{$smarty.foreach.top_goods.iteration}.gif" class="iteration">
//iteration:smarty自带的循环次数 表示方法:$smarty.foreach.name.iteration
{if $smarty.foreach.top_goods.iteration<4}
<li class="topimg"><a href="{$top.url}//商品url"><img src="{$top.thumb}//商品缩略图" alt="{$top.name|escape:html}//商品名称"></a></li>
{/if}
<li {if $smarty.foreach.top_goods.iteration<4}class="iteration1"{/if}>
<a href="{$top.url}//商品url"><img src="{$top.thumb}//商品缩略图" title="{$top.name|escape:html}//商品名称">{$top.short_name}//商品名称</a>
{$lang.shop_rice}{$top.price}//商品价格
</li>
</ul>
{/foreach}
促销活动/优惠活动
{if $promotion_info}
<h3>{$lang.promotion_info}</h3>
{foreach from=$promotion_info item=item key=key}
{if $item.type eq "snatch"}//如果为夺宝奇兵
<a href="snatch.php" title="{$lang.$item.type}//活动类型">{$lang.snatch_promotion}</a>
{elseif $item.type eq "group_buy"}//如果为团购
<a href="group_buy.php" title="{$lang.$item.type}//活动类型">{$lang.group_promotion}</a>
{elseif $item.type eq "auction"} //如果为拍卖
<a href="auction.php" title="{$lang.$item.type}//活动类型">{$lang.auction}</a>
{elseif $item.type eq "favourable"} //如果为优惠活动
<a href="favourable.php" title="{$lang.$item.type}//活动类型">{$lang.favourable}</a>
{elseif $item.type eq "package"} //如果为礼包
<a href="package.php" title="{$lang.$item.type}//活动类型">{$lang.package}</a>
{/if}
<a href="{$item.url}//活动url" title="{$lang.$item.type}{$item.act_name}{$item.time}//活动名称及活动时间">{$item.act_name}//活动名称</a>
{/foreach}
{/if}
2014年05月17日 12点05分 1
1