ecshop常用标签

当前位置:  首页   >   手机类型   >   GSM手机   >  诺基亚N85  调用的代码如下:
{$lang.ur_here} {$ur_here}

-----------------------------------------------------------------------------------------------
if语句的用法:
<!-- {if $smarty.foreach.pro.iteration == 3} --> <img src="images/new.gif"/>   <!-- {/if} --> 
   下标从0开始{$smarty.foreach. top_goods.index}
  下标从1开始<!-- {$smarty.foreach.top_goods.iteration} --> 

------------------------------------------------------------------------------------------------

ECSHOP调用指定大类ID下面的子栏目:

ECSHOP调用指定大类ID下面的子栏目:
{foreach from=$categories[6][cat_id] item=rec_data}
<li><a href="{$rec_data.url}">{$rec_data.name}</a></li>
{/foreach}

也就是把$categories[6]中的数字换成其他大类ID就可以了。

----------------------------------------------------------------------------------------------

站内搜索的代码 :

 

   <script type="text/javascript">

    {literal}

    <!--

    function checkSearchForm()

    {

        if(document.getElementByIdx_x_x_x_x_x_x('keyword').value)

        {

            return true;

        }

        else

        {

            alert("{$lang.no_keywords}");

            return false;

        }

    }

    -->

    {/literal}

    </script>

    {if $searchkeywords}

   {$lang.hot_search} :

   {foreach from=$searchkeywords item=val}

   <a href="search.php?keywords={$val|escape:url}">{$val}</a>

   {/foreach}

   {/if}

  </div>

  <form id="searchForm" name="searchForm" method="get" action="search.php" onSubmit="return checkSearchForm()" class="f_r"  style="_position:relative; top:5px;">

   <select name="category" id="category" class="B_input">

      <option value="0">{$lang.all_category}</option>

      {$category_list}

    </select>

   <input name="keywords" type="text" id="keyword" value="{$search_keywords|escape}" class="B_input" style="width:110px;"/>

   <input name="imageField" type="submit" value="" class="go" style="cursor:pointer;" />

   <a href="search.php?act=advanced_search">{$lang.advanced_search}</a>

   </form>

----------------------------------------------------------------------------------------------

商品公告调用代码:

公告的标题:{$lang.shop_notice}  公告的内容:{$shop_notice}

----------------------------------------------------------------------------------------------

购物车调用代码:

 

{insert_scripts files='transport.js'}

{insert name='cart_info'}

 

----------------------------------------------------------------------------------------------

今日特价代码调用:

 

    <!-- {if $promotion_goods} -->

         <!--{foreach from=$promotion_goods item=goods name="promotion_foreach"}-->

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

<a href="{$goods.url}"><img src="{$goods.thumb}" border="0" alt="{$goods.name|escape:html}"/></a><br />  <p><a href="{$goods.url}" title="{$goods.name|escape:html}"> $goods.short_name|escape:html}</a></p>

   {$lang.promote_price}<font class="f1">{$goods.promote_price}</font>

         {/if}

         <!--{/foreach}-->

<!-- {/if} -->

----------------------------------------------------------------------------------------------

 

品牌推荐代码调用:

<!-- {if $brand_list} -->

  <!-- {foreach from=$brand_list item=brand name="brand_foreach"} -->

    {if $smarty.foreach.brand_foreach.index <= 11}

      <!-- {if $brand.brand_logo} -->

        <a href="{$brand.url}"><img src="data/brandlogo/{$brand.brand_logo}" 

alt="{$brand.brand_name|escape:html} ({$brand.goods_num})" /></a>

      <!-- {else} -->

        <a href="{$brand.url}">{$brand.brand_name|escape:html} {if $brand.goods_num}

({$brand.goods_num}){/if}</a>

      <!-- {/if} -->

    {/if}

  <!-- {/foreach} -->

<!-- {/if} -->

----------------------------------------------------------------------------------------------

热门商品调用代码:

<!-- {if $hot_goods} -->

  

<!--{foreach from=$hot_goods item=goods}-->

 

  <div class="goodsItem">

         <span class="hot"></span>

           <a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}" class="goodsimg" /></a><br />

           <p><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_style_name}</a></p>

           <font class="f1">

           <!-- {if $goods.promote_price neq ""} -->

          {$goods.promote_price}

          <!-- {else}-->

          {$goods.shop_price}

          <!--{/if}-->

           </font>

        </div>

  <!--{/foreach}-->

 <!--{/if}-->

 

----------------------------------------------------------------------------------------------

最新商品调用代码:
<!-- {if $new_goods} -->

  <!--{foreach from=$new_goods item=goods}-->
  <div class="goodsItem">
         <span class="news"></span>
           <a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}" class="goodsimg" /></a><br />
           <p><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_style_name}</a></p>
           <font class="f1">
           <!-- {if $goods.promote_price neq ""} -->
          {$goods.promote_price}
          <!-- {else}-->
          {$goods.shop_price}
          <!--{/if}-->
           </font>
        </div>
  <!--{/foreach}-->

<!-- {/if} -->

----------------------------------------------------------------------------------------------

精品推荐调用代码:

<!-- {if $best_goods} -->

  <!--{foreach from=$best_goods item=goods}-->
  <div class="goodsItem">
         <span class="best"></span>
           <a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}" class="goodsimg" /></a><br />
           <p><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_style_name}</a></p>
           <font class="f1">
           <!-- {if $goods.promote_price neq ""} -->
          {$goods.promote_price}
          <!-- {else}-->
          {$goods.shop_price}
          <!--{/if}-->
           </font>
        </div>
  <!--{/foreach}-->

          <!--{/if}-->
 

----------------------------------------------------------------------------------------------

销售排行调用代码:

  <!-- {foreach name=top_goods from=$top_goods item=goods}-->
  <ul class="clearfix">
<img src="../images/top_{$smarty.foreach.top_goods.iteration}.gif" class="iteration" />
<!-- {if $smarty.foreach.top_goods.iteration<4}-->
      <li class="topimg">
      <a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}" class="samllimg" /></a>
      </li>
<!-- {/if} -->
      <li {if $smarty.foreach.top_goods.iteration<4}class="iteration1"{/if}>
      <a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_name}</a><br />
      {$lang.shop_price}<font class="f1">{$goods.price}</font><br />
      </li>
    </ul>
  <!-- {/foreach} -->

----------------------------------------------------------------------------------------------

站内栏目调用代码:
<!--{foreach from=$new_articles item=article}-->
   <li>
[<a href="{$article.cat_url}">{$article.cat_name}</a>] <a href="{$article.url}" title="{$article.title|escape:html}">{$article.short_title|truncate:10:"...":true}</a>
</li>
<!--{/foreach}-->

----------------------------------------------------------------------------------------------

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

商品页代码如下:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

----------------------------------------------------------------------------------------------

 

相关商品的列表页调用代码:

<!-- {if $cat_list} -->
      <!-- {foreach from=$cat_list item=cat} -->
        <dt><a href="{$cat.url}">{$cat.cat_name|escape:html} {if $cat.goods_num}({$cat.goods_num}){/if}</a></dt>
      <!--{/foreach}--> 
<!-- {/if} -->

----------------------------------------------------------------------------------------------

相关产品的调用代码:
----------------------------------------------------------------------------------------------
<!-- {if $goods_article_list} -->
         {$lang.article_releate}
        <!-- {foreach from=$goods_article_list item=article} 相关文章 -->
      <a href="{$article.url}" title="{$article.title|escape:html}">{$article.short_title|escape:html}</a><br />
      <!--{/foreach}-->
<!-- {/if} -->


相关属性的调用代码:
----------------------------------------------------------------------------------------------
<!--{foreach from=$attribute_linked item=linked}-->
<!-- {if $linked.goods} -->
<div class="box">
  <div class="box_1">
   <h3><span title="{$linked.title}">{$linked.title|truncate:11:"...":true}</span></h3>
   <div class="boxCenterList clearfix">
   <!-- {foreach from=$linked.goods item=linked_goods_data} -->
   <ul class="clearfix">
         <li class="goodsimg">
         <a href="{$linked_goods_data.url}" target="_blank"><img src="{$linked_goods_data.goods_thumb}" alt="{$linked_goods_data.name|escape:html}" class="B_blue" /></a>
         </li>
         <li>
         <a href="{$linked_goods_data.url}" target="_blank" title="{$goods.linked_goods_data_name|escape:html}">{$linked_goods_data.short_name|escape:html}</a><br />
         {$lang.shop_price}<font class="f1">{$linked_goods_data.shop_price}</font><br />
         </li>
      </ul>
   <!-- {/foreach} -->
   </div>
  </div>
</div>
<div class="blank5"></div>
<!-- {/if} -->
<!-- 结束属性关联的商品 {/foreach}-->


浏览产品相关记录的调用代码:
----------------------------------------------------------------------------------------------
<div class="box" id='history_div'>
  <div class="box_1">
   <h3><span>{$lang.view_history}</span></h3>
   <div class="boxCenterList clearfix" id='history_list'>
      {insert name='history'}
   </div>
  </div>
</div>
<div class="blank5"></div>
<script type="text/javascript">
if (document.getElementByIdx_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x('history_list').innerHTML.replace(/\s/g,'').length<1)
{
      document.getElementByIdx_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x('history_div').style.display='none';
}
else
{
      document.getElementByIdx_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x('history_div').style.display='block';
}
function clear_history()
{
Ajax.call('user.php', 'act=clear_history',clear_history_Response, 'GET', 'TEXT',1,1);
}
function clear_history_Response(res)
{
document.getElementByIdx_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x('history_list').innerHTML = '{$lang.no_history}';
}
</script>



商品的图片调用代码:
----------------------------------------------------------------------------------------------
        <!-- {if $pictures}-->
        <a href="javascript:;" οnclick="window.open('gallery.php?id={$goods.goods_id}'); return false;">
         <img src="{$goods.goods_img}" alt="{$goods.goods_name|escape:html}"/>
        </a>
              <!-- {else} -->
              <img src="{$goods.goods_img}" alt="{$goods.goods_name|escape:html}"/>
              <!-- {/if}-->


商品的小的缩略图调用代码:
----------------------------------------------------------------------------------------------
             <!-- {foreach from=$pictures item=picture}-->
            <li><a href="gallery.php?id={$id}&amp;img={$picture.img_id}" target="_blank"><img src="{if $picture.thumb_url}{$picture.thumb_url}{else}{$picture.img_url}{/if}" alt="{$goods.goods_name}" class="B_blue" /></a>
            </li> 
            <!--{/foreach}-->

商品的品名相关代码:
----------------------------------------------------------------------------------------------
商品的名称:{$goods.goods_style_name}
商品的货号:<!-- {if $cfg.show_goodssn} 显示商品货号-->
                  <strong>{$lang.goods_sn}</strong>{$goods.goods_sn}
                  <!-- {/if} -->

----------------------------------------------------------------------------------------------
商品的库存调用代码:
----------------------------------------------------------------------------------------------
           <!-- {if $goods.goods_number neq "" and $cfg.show_goodsnumber} 商品库存-->
            <!-- {if $goods.goods_number eq 0} -->
               <strong>{$lang.goods_number}</strong>
               <font color='red'>{$lang.stock_up}</font>
            <!-- {else} -->
               <strong>{$lang.goods_number}</strong>
               {$goods.goods_number} {$goods.measure_unit}
            <!-- {/if} -->
         <!-- {/if} -->
----------------------------------------------------------------------------------------------
上一个下一个商品调用代码:
----------------------------------------------------------------------------------------------
     {if $prev_good}
         <a href="{$prev_good.url}"><img alt="prev" src="./images/up.gif" /></a>
         {/if}
         {if $next_good}
         <a href="{$next_good.url}"><img alt="next" src="./images/down.gif" /></a>
         {/if}
----------------------------------------------------------------------------------------------
商品的品牌调用代码:
----------------------------------------------------------------------------------------------
       <!-- {if $goods.goods_brand neq "" and $cfg.show_brand} 显示商品品牌-->
           <strong>{$lang.goods_brand}</strong><a href="{$goods.goods_brand_url}" >{$goods.goods_brand}</a>
           <!--{/if}-->

商品的重量调用代码:
----------------------------------------------------------------------------------------------
       <!-- {if $cfg.show_goodsweight} 商品重量-->
       <strong>{$lang.goods_weight}</strong>{$goods.goods_weight}
       <!-- {/if} -->

商品的上架时间调用代码:
----------------------------------------------------------------------------------------------

      <!-- {if $cfg.show_addtime} 上架时间-->
      <strong>{$lang.add_time}</strong>{$goods.add_time}
      <!-- {/if} -->

商品的点击数调用代码:
----------------------------------------------------------------------------------------------
 <strong>{$lang.goods_click_count}: </strong>{$goods.click_count}

商品的价格调用代码:
----------------------------------------------------------------------------------------------
     <!-- {if $cfg.show_marketprice} 市场价格-->
           <strong>{$lang.market_price}</strong><font class="market">{$goods.market_price}</font><br />
           <!-- {/if} -->
           <!--本店售价-->
           <strong>{$lang.shop_price}</strong><font class="shop" id="ECS_SHOPPRICE">{$goods.shop_price_formated}</font><br />
           <!-- {foreach from=$rank_prices item=rank_price key=key} 会员等级对应的价格-->
           <strong>{$rank_price.rank_name}:</strong><font class="shop" id="ECS_RANKPRICE_{$key}">{$rank_price.price}</font><br />
           <!--{/foreach}-->

商品的用户评价调用代码:
----------------------------------------------------------------------------------------------
<strong>{$lang.goods_rank}</strong>
      <img src="images/stars{$goods.comment_rank}.gif" alt="comment rank {$goods.comment_rank}" />

商品的购买数量调用代码:
----------------------------------------------------------------------------------------------
 <strong>{$lang.number}:</strong>
            <input name="number" type="text" id="number" value="1" size="4" οnblur="changePrice()" style="border:1px solid #ccc; "/>
           </dd>

商品的可用的积分调用代码:
----------------------------------------------------------------------------------------------
           <!-- {if $cfg.use_integral} 购买此商品可使用积分-->
           <strong>{$lang.goods_integral}</strong><font class="f4">{$goods.integral} {$points_name}</font>
           <!-- {/if} -->

商品的属性 调用代码:
----------------------------------------------------------------------------------------------

  <strong>{$spec.name}:寺</strong><br />
        <!-- {* 判断属性是复选还是单选 *} -->
                    <!-- {if $spec.attr_type eq 1} -->
                      <!-- {if $cfg.goodsattr_style eq 1} -->
                        <!-- {foreach from=$spec.values item=value key=key} -->
                        <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} οnclick="changePrice()" />
                        {$value.label} [{if $value.price gt 0}{$lang.plus}{elseif $value.price lt 0}{$lang.minus}{/if} {$value.format_price|abs}] </label><br />
                        <!-- {/foreach} -->
                        <input type="hidden" name="spec_list" value="{$key}" />
                        <!-- {else} -->
                        <select name="spec_{$spec_key}" οnchange="changePrice()">
                          <!-- {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} -->
                    <!-- {else} -->
                      <!-- {foreach from=$spec.values item=value key=key} -->
                      <label for="spec_value_{$value.id}">
                      <input type="checkbox" name="spec_{$spec_key}" value="{$value.id}" id="spec_value_{$value.id}" οnclick="changePrice()" />
                      {$value.label} [{if $value.price gt 0}{$lang.plus}{elseif $value.price lt 0}{$lang.minus}{/if} {$value.format_price|abs}] </label><br />
                      <!-- {/foreach} -->
                      <input type="hidden" name="spec_list" value="{$key}" />
                    <!-- {/if} -->
      </li>
      <!-- {/foreach} -->
      <!-- {* 结束循环可选属性 *} -->

商品的其它购买 调用代码:
----------------------------------------------------------------------------------------------
<!-- {if $bought_goods} -->
           <!--{foreach from=$bought_goods item=bought_goods_data}-->
      <a href="{$bought_goods_data.url}"><img src="{$bought_goods_data.goods_thumb}" alt="{$bought_goods_data.goods_name}"   class="goodsimg" /></a><br />
        <p><a href="{$bought_goods_data.url}" title="{$bought_goods_data.goods_name}">{$bought_goods_data.short_name}</a></p> <br />
           <!-- {if $bought_goods_data.promote_price neq 0} -->
            <font class="shop_s">{$bought_goods_data.formated_promote_price}</font>
            <!-- {else} -->
            <font class="shop_s">{$bought_goods_data.shop_price}</font>
            <!-- {/if} -->
            <!-- {/foreach} -->
      <!-- {/if} -->

商品的属性 调用代码:
----------------------------------------------------------------------------------------------
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值