0

今天是个好日子,

我认为我还没有看到一个网站可以做到这一点。我想尝试显示父类别的子类别的子类别;如果这是有道理的。

  • 父类别(父类别)
    • 子类别(父子类别)
      • 子类别(子子类别)
    • 父子类别项目

我们目前正在使用 NetSuite 的 SuiteCommerce Advanced 来管理网上商店。我的开发人员说我们无法编写脚本。我们可以提取子类别和它的项目,但我们不能走得更远。

最好的方法似乎是将子子类别内容编码为 HTML,然后将 HTML 显示到facets_category_cell.tpl文件中

我首先创建了另一个记录字段,将其分配给 Commerce 类别并将其命名为HTML 子类别。字段类型是富文本,这似乎是 HTML 的正确字段类型。

在我保存带有子类别 HTML 内容的 Commerce 类别之后。我去了facets_category_cell.tpl文件,并将该字段添加到代码中。我尝试了两种方法,但无法显示 HTML。它总是一片空白。

{{custrecordsubcathtml}}

{{modal.custrecordsubcathtml}}

下面是我们目前拥有的用于提取子类别的代码。我在描述下方添加了 custrecordsubcathtml 标签。

    <div class="facets-category-cell"                   id="facets-category-cell-{{intlid}}" data-id="{{intlid}}">
        <div class="facets-cell-anchor" id="facets-cell-anchor-{{intlid}}"><a name="cat-{{intlid}}">{{name}}</a></div>
        <div class="facets-category-cell-title">    
            <div class="facets-category-cell-left {{#if hasImage}} image {{/if}}"    id="category-name-{{intlid}}">
                <a href="{{url}}" class="facets-category-cell-anchor">{{name}}</a>
                <div class="facets-category-cell-description">{{theDesc}}</div>
        <div>{{custrecordsubcathtml}}</div>
            </div>
                    
            {{#if hasImage}}
                <div class="facets-category-cell-thumbnail" onclick="toggleCatCell(this)"  data-id="{{intlid}}">
                    <img loading="lazy" src="{{resizeImage image 'thumbnail'}}" alt="{{name}}" class="facets-category-cell-image">
                </div>
            {{/if}}
            
            <div class="facets-category-cell-arrow" id="facets-category-cell-arrow-{{intlid}}" onclick="toggleCatCell(this)"  data-id="{{intlid}}">
                <span class='fa chev-right'></span>
            </div>
                
        </div>
        <div id="seriesDiv{{intlid}}" class="hideHandheld"></div>   
    </div>

我必须以某种方式提取这些信息吗?还是我们无法做到这一点?

4

0 回答 0