Ecshop模板开发的一些问题?

给别人套个网站,但是没研究明白Ecshop的模板那到底是怎么运用的。有清楚的指点下。

比如我要在首页获取特定分类下商品,版本是2.7.3

$smarty->assign('threebest',        get_category_recommend_goods('best',3));  // 分类3下边的精品$smarty->assign('threenew',         get_category_recommend_goods('best',3));  //分类3下边的新品$smarty->assign('threehot',         get_category_recommend_goods('best',3));  //分类3下边的热销

然后是在首页调用:

<!-- {if $threebest} -->  <!--{foreach from=$threebest 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 $threenew} -->  <!--{foreach from=$threenew 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 $threhot} -->  <!--{foreach from=$threhot 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} -->

现在是有2个问题:

1.为什么这样设置了不显示,还需要哪些设置,还是这样设置就不对,应该怎么设置

2.lbi文件的作用是什么有些不是很明白,有没有可以解释下的。

就这2个问题困扰了好几天了,不是做PHP开发的过来改这个真不好弄,也不能断点调试,准备看下Smarty了。

快乐要懂得分享,才能加倍的快乐

Ecshop模板开发的一些问题?

相关文章:

你感兴趣的文章:

标签云: