后台设置首页模板,点确定后会增加商品数量

2016-07-07 16:09 来源:www.chinab4c.com 作者:ecshop专家

如题,用Genuine的模板改动了一点点.. 但有一个问题..
就是在下面的分类商品会重复显示.
每次后台设置模板首页确定后就会在首页的分类商品下面增加8个商品..

店铺地址:www.hk-ibride.com

请教名位,是在什么地方设置不当还是什么原因.

回答:
应该是模板中重复读取了
贴下你的index.dwt

你的不是最新的index.dwt吧?
从你FTP上下载最新的index.dwt传上来



这是下载下来的代码: 但是和我上传的代码不一样..有增加内容!


  1. <div class="blank"></div>

  2. <!-- TemplateBeginEditable name="通栏产品1" -->
  3. <!-- #BeginLibraryItem "/library/cat_goods.lbi" -->
  4. <div class="mod1 blank" id="CatGoods">
  5. <span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
  6. <h1 class="mod1tit">{$goods_cat.name|escape:html}<a href="{$goods_cat.url}" class="more">更多</a></h1>
  7. <div class="w200 fl bestAd">
  8. <!-- TemplateBeginEditable name="分类左侧200x585" -->
  9. <!-- TemplateEndEditable -->
  10. </div>
  11. <div class="mod1con group">
  12. <!--{foreach from=$cat_goods item=goods}-->
  13. <div class="goodsbox">
  14. <div class="imgbox"><a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}" /></a></div>
  15. <a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_name|escape:html}</a><br />
  16. <!-- {if $goods.promote_price neq ""} -->
  17. {$lang.promote_price}<b class="f1">{$goods.promote_price}</b><br>
  18. <!-- {else}-->
  19. {$lang.shop_price}<bclass="f1">{$goods.shop_price}</b><br>
  20. <!--{/if}-->
  21. </div>
  22. <!--{/foreach}-->
  23. </div>
  24. </div>
  25. <!-- #EndLibraryItem -->
  26. <!-- TemplateEndEditable -->
  27. </div>
  28. <div class="mod1con group">
  29. <!--{foreach from=$cat_goods item=goods}-->
  30. <div class="goodsbox">
  31. <div class="imgbox"><a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}" /></a></div>
  32. <a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_name|escape:html}</a><br />
  33. <!-- {if $goods.promote_price neq ""} -->
  34. {$lang.promote_price}<b class="f1">{$goods.promote_price}</b><br>
  35. <!-- {else}-->
  36. {$lang.shop_price}<bclass="f1">{$goods.shop_price}</b><br>
  37. <!--{/if}-->
  38. </div>
  39. <!--{/foreach}-->
  40. </div>
  41. </div>
  42. <!-- #EndLibraryItem -->
  43. <!-- TemplateEndEditable -->
  44. </div>
  45. <div class="mod1con group">
  46. <!--{foreach from=$cat_goods item=goods}-->
  47. <div class="goodsbox">
  48. <div class="imgbox"><a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}" /></a></div>
  49. <a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_name|escape:html}</a><br />
  50. <!-- {if $goods.promote_price neq ""} -->
  51. {$lang.promote_price}<b class="f1">{$goods.promote_price}</b><br>
  52. <!-- {else}-->
  53. {$lang.shop_price}<bclass="f1">{$goods.shop_price}</b><br>
  54. <!--{/if}-->
  55. </div>
  56. <!--{/foreach}-->
  57. </div>
  58. </div>
  59. <!-- #EndLibraryItem -->
  60. <!-- TemplateEndEditable -->
  61. <!-- TemplateBeginEditable name="通栏产品2" -->
  62. <!-- #BeginLibraryItem "/library/cat_goods.lbi" -->
  63. <div class="mod1 blank" id="CatGoods">
  64. <span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
  65. <h1 class="mod1tit">{$goods_cat.name|escape:html}<a href="{$goods_cat.url}" class="more">更多</a></h1>
  66. <div class="w200 fl bestAd">
  67. <!-- TemplateBeginEditable name="分类左侧200x585" -->
  68. <!-- TemplateEndEditable -->
  69. </div>
  70. <div class="mod1con group">
  71. <!--{foreach from=$cat_goods item=goods}-->
  72. <div class="goodsbox">
  73. <div class="imgbox"><a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}" /></a></div>
  74. <a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_name|escape:html}</a><br />
  75. <!-- {if $goods.promote_price neq ""} -->
  76. {$lang.promote_price}<b class="f1">{$goods.promote_price}</b><br>
  77. <!-- {else}-->
  78. {$lang.shop_price}<bclass="f1">{$goods.shop_price}</b><br>
  79. <!--{/if}-->
  80. </div>
  81. <!--{/foreach}-->
  82. </div>
  83. </div>
  84. <!-- #EndLibraryItem -->
  85. <!-- TemplateEndEditable -->
  86. </div>
  87. <div class="mod1con group">
  88. <!--{foreach from=$cat_goods item=goods}-->
  89. <div class="goodsbox">
  90. <div class="imgbox"><a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}" /></a></div>
  91. <a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_name|escape:html}</a><br />
  92. <!-- {if $goods.promote_price neq ""} -->
  93. {$lang.promote_price}<b class="f1">{$goods.promote_price}</b><br>
  94. <!-- {else}-->
  95. {$lang.shop_price}<bclass="f1">{$goods.shop_price}</b><br>
  96. <!--{/if}-->
  97. </div>
  98. <!--{/foreach}-->
  99. </div>
  100. </div>
  101. <!-- #EndLibraryItem -->
  102. <!-- TemplateEndEditable -->
  103. </div>
  104. <div class="mod1con group">
  105. <!--{foreach from=$cat_goods item=goods}-->
  106. <div class="goodsbox">
  107. <div class="imgbox"><a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}" /></a></div>
  108. <a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_name|escape:html}</a><br />
  109. <!-- {if $goods.promote_price neq ""} -->
  110. {$lang.promote_price}<b class="f1">{$goods.promote_price}</b><br>
  111. <!-- {else}-->
  112. {$lang.shop_price}<bclass="f1">{$goods.shop_price}</b><br>
  113. <!--{/if}-->
  114. </div>
  115. <!--{/foreach}-->
  116. </div>
  117. </div>
  118. <!-- #EndLibraryItem -->
  119. <!-- TemplateEndEditable -->

  120. <!-- #BeginLibraryItem "/library/help.lbi" --><!-- #EndLibraryItem -->
复制代码

index.zip (4.98 KB)

index.dwt