2017-04-20 77 views
0

我试图按品牌将商店添加到Bigcommerce主题中。我已经通过模板文件,似乎无法确定我需要做什么。我找到了“shop-by-price.html”模板页面,我想我可以在它上面粘贴一些代码,但似乎无法找到品牌列表代码。这里是shop-by-price.html页面在Bigcommerce模板主题中添加侧栏“Shop by Brands”

{{#if shop_by_price}} 
    <div class="sidebar-block shop-by-price facet-list" data-facet-filter> 
    {{> components/common/facet-toggle title=(lang 'category.shop_by_price')}} 
    <ul class="facet-list-items is-open" data-facet-filter-wrapper> 
     {{#each shop_by_price}} 
     <li class="facet-item"> 
      <a class="{{#if selected }}is-active{{/if}}" href="{{url}}" alt="{{low.formatted}} - {{high.formatted}}">{{low.formatted}} - {{high.formatted}}</a> 
     </li> 
     {{/each}} 
    </ul> 
    {{#any shop_by_price selected=true}} 
     <a href="{{category_url}}" class="link facet-remove"> 
     {{lang 'category.reset'}} 
     </a> 
    {{/any}} 
    </div> 
{{/if}} 

非常感谢您的帮助。谢谢!

+0

检查后截图:http://prntscr.com/ez0t23 –

+0

是那个屏幕截图的反映,代码是什么? – Damien

+0

你现在可以检查网站。 –

回答

0

,如果我没看错的,所以你要显示在类别栏页品牌排行榜,请打开从管理端你的模板主题编辑器,然后 模板 - >组件 - >类别 - > sidebar.html打开文件sidebar.html并粘贴下面的代码

<nav> 
    {{#if category.subcategories}} 
    <div class="sidebarBlock"> 
     <h5 class="sidebarBlock-heading">{{category.name}}</h5> 
     <ul class="navList"> 
      {{#each category.subcategories}} 
      <li class="navList-item"> 
       <a class="navList-action" href="{{url}}" alt="{{name}}" title="{{name}}">{{name}}</a> 
      </li> 
      {{/each}} 
     </ul> 
    </div> 
    {{/if}} 
{{#if shop_by_brand}} 
     <div class="sidebarBlock"> 
      <h5 class="sidebarBlock-heading">{{lang 'brand.label'}}</h5> 
      <ul class="navList"> 
       {{#each shop_by_brand}} 
        <li class="navList-item"> 
         <a class="navList-action" href="{{url}}">{{name}}</a> 
        </li> 
       {{/each}} 
       <li class="navList-item"> 
        <a class="navList-action" href="{{urls.brands}}">{{lang 'common.view_all'}}</a> 
       </li> 
      </ul> 
     </div> 
     {{/if}} 
    {{#if category.faceted_search_enabled}} 
     {{> components/faceted-search/index category}} 
    {{else}} 
     {{> components/category/shop-by-price shop_by_price=category.shop_by_price category_url=category.url}} 
    {{/if}} 

</nav> 

击中保存并应用按钮,它看起来像这样 http://deepak-diwan-s-store.mybigcommerce.com/ala-carte-by-the-lb/

+0

您发给我的网站没有侧栏,只是一页上有一堆物品 – Damien

+0

对不起,我做了一些更改,请现在检查它。 –

相关问题