ECSHOP首页显示调用自定义分类商品best, new, hot

ECSHOP教程 来源: ECSHOP教程网www.ecshop119.com 时间:2013-07-06 ECSHOP教程分类:ECSHOP商城首页修改

ECSHOP首页显示调用自定义分类商品best, new, hot

 

首先介绍:首页 调用自定义商品分类精品

index.php

$smarty->assign('cat_id19_best_goods', index_get_cat_id_goods_best_list(19,10));

19是商品分类ID    10显示数量

然后index.dwt :

<!-- {foreach  from=$cat_id19_best_goods item=goods  name=no}-->

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

      <font class="f1">
    <!-- {if $goods.promote_price neq ""} -->
    {$goods.promote_price}
    <!-- {else}-->
    {$goods.shop_price}
    <!--{/if}-->
    </font>
     <font class="market">{$goods.market_price}</font>
</div>        
<!-- {/foreach} -->

 

 

另外一种:

index.php加入:

 $smarty->assign('new_goods1',       recommend_goods('new',24));

 

模板调用方法:
     <!--{foreach from=$new_goods1
     + item=goods}-->
            <li>
                <div class="ul2_img"><a href="{$goods.url}"><img src="{$goods.thumb}" width="160"  height="212"/></a></div>
                <div class="ul2_details">
                    <div class="bor_r_gray">
                         <p class="ul2_details_title"><a href="{$goods.url}"  title="{$goods.name|escape:html}">{$goods.name|truncate:11:"...":true}</a></p>
                        <!-- {foreach from=$goods.pros item=property_group key=key name=property1} -->
                            <!-- {foreach from=$property_group item=property name=property} -->
                              <!--{if $property.name=="净重"}--> 
                                   <p>净含量:{$property.value|escape:html}</p>
                              <!--{/if}-->                    
                            <!-- {/foreach}-->
                        <!-- {/foreach}--> 
                         <p><span class="market_price">市场价{$goods.market_price}</span><span class="reality_price">模板屋价{$goods.shop_price}</span></p>
                   
                    </div>
                </div>
            </li>
            <!--{/foreach}-->         

 

 

 

本文模板屋原创地址: https://www.ecshop119.com/ecshopjc-710.html
模板屋版权所有 © 转载时必须以链接形式注明出处!

ECSHOP模板屋
ecshop开发团队 ecshop开发中心 ecshop模板制作 ecshop模板屋
ECSHOP
ecshop下载 ecshop安装教程 ecshop在线演示 ecshop后台测试
ECSHOP二次开发手册
ecshop教程 ecshop二次开发 ecshop模板教程 ecshop微信配置
ECSHOP商城网站建设
ecshop空间域名 ecshop商城建设 ecshop模板修改 ecshop开发定制
服务支持:7X24小时 151 059 55077
ECShop二次开发
ecshop搭建
qqtelcodeback_top
温馨提示

确定取消
温馨提示

关闭