1. 程式人生 > >ECSHOP模板經常用到的標籤

ECSHOP模板經常用到的標籤

首頁

<!--開始圖片型別的友情連結{foreach from=$img_links item=link}-->
<span style="width: 100px; text-align: center">
<a href="{$link.url}" target="_blank" title="{$link.name}"><img src="{$link.logo}" width="88" height="31" alt="{$link.name}" border="0" /></a>
</span>
<!--結束圖片型別的友情連結{/foreach}-->
<!--開始文字型別的友情連結{foreach from=$txt_links item=link}--> <span style="width: 100px; text-align: center"> [<a href="{$link.url}" target="_blank" title="{$link.name}">{$link.name}</a>] </span> <!--結束文字型別的友情連結{/foreach}--> <!-- 客服電話{if $service_phone} --> Tel: {$service_phone} <!-- 結束客服電話{/if} -->
聯絡客服: <!-- QQ 號碼 {foreach from=$qq item=im} --> <!-- {if $im} --> <a href="http://wpa.qq.com/msgrd?V=1&Uin={$im}&Site={$shop_name}&Menu=yes" target="_blank"><img src="http://wpa.paipai.com/pa?p=1:{$im}:16" alt="諮詢商品資訊,交流購物心得。" width="77" height="17" border
="0" align="absmiddle">
</a> <!-- {/if} --> <!-- {/foreach} 結束QQ號碼 --> <!-- 淘寶旺旺 {foreach from=$ww item=im} --> <!-- {if $im} --> <a href="http://amos1.taobao.com/msg.ww?v=2&uid={$im|escape:u8_url}&s=1" target="_blank"><img src="http://amos1.taobao.com/online.ww?v=2&uid={$im|escape:u8_url}&s=1" alt="諮詢商品資訊,交流購物心得。" border="0" align="absmiddle"></a> <!-- {/if} --> <!--{/foreach} 結束淘寶旺旺 --> <!-- ICP 證書{if $icp_number} --> {$lang.icp_number}:<a href="http://www.miibeian.gov.cn/" target="_blank">{$icp_number}</a> <!-- 結束ICP 證書{/if} --> <!-- 最新文章 --> <!--{foreach from=$new_articles item=article}--> <p>[<a href="{$article.cat_url}">{$article.cat_name}</a>] <a href="{$article.url}" title="{$article.title|escape:html}">{$article.short_title}</a></p> <!--{/foreach}--> <!-- 發貨單查詢{foreach from=$invoice_list item=invoice} --> <strong>{$lang.order_number}</ strong>: {$invoice.order_sn} <strong>{$lang.consignment}</ strong>: {$invoice.invoice_no} <!-- {/foreach} --> <!-- 首頁底下航欄 --> <script type="text/javascript">var process_request = "{$lang.process_request}";</script> <!-- {foreach name=nav_bottom_list from=$navigator_list.bottom item=nav} --> <a href="{$nav.url}" <!-- {if $nav.opennew eq 1} --> target="_blank" <!-- {/if} --> >{$nav.name}</a> <!-- {if !$smarty.foreach.nav_bottom_list.last} --> <!-- {/if} --> | <!-- {/foreach} --> <!-- 首頁上面的導航欄 --> <!-- {foreach name=nav_top_list from=$navigator_list.top item=nav} --> {if $smarty.foreach.nav_top_list.last} {/if}<a href="{$nav.url}" <!-- {if $nav.opennew eq 1} -->target="_blank"<!-- {/if} -->>{$nav.name}</a> <!-- {/foreach} --> 您的購物車中有 0 件商品,總計金額 ¥0.00元 {insert name='cart_info'} <!-- 首頁中間的導航欄 --> <!-- {foreach name=nav_middle_list from=$navigator_list.middle item=nav} --> <li{if $nav.active eq 1} id="currentPage"{/if}><a href="{$nav.url}" <!-- {if $nav.opennew eq 1} -->target="_blank"<!-- {/if} -->>{$nav.name}</a></li> <!-- {/foreach} -->

文章

<!-- {if $prev_article or $next_article} -->
    <p class="globalArtileNext">
            <!-- 下一篇文章 {if $prev_article} -->
            {$lang.prev_article}:<a href="article.php?id={$prev_article.article_id}">{$prev_article.title}</a>
            <!-- {/if} -->
            <!-- 上一篇文章 {if $next_article} -->
            {$lang.next_article}:<a href="article.php?id={$next_article.article_id}">{$next_article.title}</a>
            <!-- {/if} -->
          </p>
          <!-- {/if} -->

產品詳細頁面:

{$goods.goods_style_name}
<!-- 商品銷售排名{if $goods_rank}-->
<img src="images/rank_{$goods_rank}.gif" alt="{$goods_rank}" />
<!-- {/if} -->
<!-- 如果該商品正在進行奪寶奇兵的活動顯示奪寶奇兵活動的連結{if $snatch} -->
            <li><a href="{$snatch.url}">{$lang.snatch_goods}</a></li>
            <!-- {/if} -->
<!-- 顯示商品貨號{if $cfg.show_goodssn} -->
            <li>{$lang.goods_sn} {$goods.goods_sn}</li>
            <!-- {/if} -->

<!-- 顯示商品品牌{if $goods.goods_brand neq "" and $cfg.show_brand} -->
            <li>{$lang.goods_brand} <a href="{$goods.goods_brand_url}">{$goods.goods_brand}</a></li>
            <!-- {/if} -->

<!-- 顯示商品重量{if $cfg.show_goodsweight} -->
            <li>{$lang.goods_weight} {$goods.goods_weight}</li>
            <!-- {/if} -->
<!-- 顯示商品庫存{if $goods.goods_number neq "" and $cfg.show_goodsnumber} -->
            <li>
              {$lang.goods_number} <!-- {if $goods.goods_number eq 0} --><span class="textStrong">{$lang.stock_up} </span><!-- {else} -->{$goods.goods_number} {$goods.measure_unit}
            <!-- {/if} -->
            </li>
            <!-- {/if} -->
商品標籤:  <!-- 標記{foreach from=$tags item=tag}-->
                  <a href="search.php?keywords={$tag.tag_words|escape:url}">{$tag.tag_words|escape:html}<!--[{$tag.tag_count}]}--></a>
                  <!-- 結束標記{/foreach} --> </span>
<!-- 顯示市場價格{if $cfg.show_marketprice} -->
            <li>{$lang.market_price} <span class="marketPrice">{$goods.market_price}</span></li>
            <!-- {/if} -->
<!--  本店價格 -->
            <li>{$lang.shop_price} <span class="goodsPrice" id="ECS_SHOPPRICE">{$goods.shop_price_formated}</span></li>
<!-- 會員等級對應的價格{foreach from=$rank_prices item=rank_price key=key} -->
            <li>{$rank_price.rank_name}: <span class="goodsPrice" id="ECS_RANKPRICE_{$key}">{$rank_price.price}</span></li>
            <!-- {/foreach} -->
<!-- 倒計時js{if $goods.is_promote and $goods.gmt_end_time} -->
            <li>
              {insert_scripts files='lefttime.js'}
              {$lang.promote_price} <span class="goodsPrice">{$goods.promote_price}</span>
            <li>{$lang.residual_time} <span class="goodsPrice" id="leftTime">{$lang.please_waiting}</span></li>
            <!-- {/if} -->
<!-- 購買此商品可使用積分{if $goods.integral > 0} -->
            <li>{$lang.goods_integral} {$goods.integral} {$points_name}</li>
            <!-- {/if} -->
<!--  商品點選數 -->
            <li>{$lang.goods_click_count}: {$goods.click_count}</li>
<!-- 開始迴圈所有可選屬性{foreach from=$specification item=spec key=spec_key} -->
            <li>{$spec.name}:
              <!-- {if $cfg.goodsattr_style eq 1} -->
              <!-- {foreach from=$spec.values item=value key=key} -->
              <p><label for="spec_value_{$value.id}">
              <input type="radio" name="spec_{$spec_key}" value="{$value.id}" id="spec_value_{$value.id}" {if $key eq 0}checked{/if} />
              {$value.label} <!-- {if $value.price gt 0} -->[{$lang.plus}<!-- {elseif $value.price gt 0} -->[{$lang.minus}<!-- {/if} --><!-- {if $value.price neq 0} -->{$value.format_price}]<!-- {/if} --></label></p>
              <!-- {/foreach} -->
              <input type="hidden" name="spec_list" value="{$key}" />
              <!-- {else} -->
              <select name="spec_{$spec_key}">
                <!-- {foreach from=$spec.values item=value key=key} -->
                <option label="{$value.label}" value="{$value.id}">{$value.label} <!-- {if $value.price gt 0} -->{$lang.plus}<!-- {elseif $value.price lt 0} -->{$lang.minus}<!-- {/if} --><!-- {if $value.price neq 0} -->{$value.format_price}<!-- {/if} --></option>
                <!-- {/foreach} -->
              </select>
              <input type="hidden" name="spec_list" value="{$key}" />
              <!-- {/if} -->
            </li>
            <!-- 結束迴圈可選屬性{/foreach} -->
<!--  商品總價 -->
            <li>{$lang.amount}:<span id="ECS_GOODS_AMOUNT" class="goodsPrice"></span></li>
<!--  購買數量 -->
            <li>{$lang.number}:<input name="number" type="text" value="1" size="4" id="number" class="textInput_member" /></li>

呼叫使用者評論

<!-- #BeginLibraryItem "/library/comments.lbi" --><!-- #EndLibraryItem -->
<!-- 開始迴圈屬性關聯的商品 {foreach from=$attribute_linked item=linked} -->
<!-- {if $linked.goods} -->
<div id="globalAttrlinked" class="globalModule">
  <h3>{$linked.title}</h3>
  <ul class="listStyle">
    <!-- {foreach from=$linked.goods item=linked_goods} -->
    <li><a href="{$linked_goods.url}" title="{$linked_goods.goods_name|escape:html}">{$linked_goods.short_name|escape:html}</a></li>
    <!-- {/foreach} -->
  </ul>
</div>
<!-- {/if} -->
<!-- 結束屬性關聯的商品 {/foreach} -->