ecshop二级商品分类与三级商品分类树都显示成一样效果

2016-06-13 13:05 来源:www.chinab4c.com 作者:ecshop专家

找到 category_tree.lbi 库文件找到            

     
{$cat.name|escape:html}
   
     {$child.name|escape:html}  |      
        
     直接修改成     //修改部分     
     
{$cat.name|escape:html}
          
{$child.name|escape:html}
              
  {$childer.name|escape:html}
                          
      变化是红色部分案例2:实现此项功能,主要是修改模板文件:category_tree.lbi{assign var="isshow" value=0}{assign var="mylevel" value=0}     {$cat.name|escape:html}
                                     {if $mychild.id eq $child.id}                   {assign var="isshow" value=1}                   {assign var="mylevel" value=$mychild.level}                   {$mychild.name|escape:html}
              {else}                   {if $mychild.level le $mylevel}                      {assign var="isshow" value=0}                   {/if}                   {if $isshow eq 1}                      {$mychild.name|escape:html}
                   {/if}              {/if}