在Bigcommerce模板主题中添加侧栏“Shop by Brands”

问题描述 投票:0回答:1

我正在尝试按品牌添加商店到Bigcommerce主题。我一直在浏览模板文件,似乎无法弄清楚我需要做什么。我找到了“shop-by-price.html”模板页面,我想我可以在它上面粘贴一些代码,但似乎无法找到品牌列表代码。

这是shop-by-price.html页面

{{#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}}
bigcommerce
1个回答
0
投票

如果我没有错,那么你想在类别边栏页面显示品牌列表,所以请从管理员端打开你的模板主题编辑器然后模板 - > components-> category-> 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/

© www.soinside.com 2019 - 2024. All rights reserved.