Good day everyone,
I don't think that I've seen a website that has pulled this off yet. I want to try and display the subcategories of a parent category's subcategories; if that makes sense.
- Parent Category (parent category)
- Subcategory (parent subcategory)
- subcategory (child subcategory / SubSubCategory)
- Parent subcategory items
We're currently using NetSuite's SuiteCommerce Advanced to manage the webstore. My developer has said that we're unable to script this. We can pull the subcategories and it's items, but we cannot go further than that.
The best approach appears to have the child subcategory content coded in HTML and then display the HTML onto the facets_category_cell.tpl file
I first created an other record field, assigned it to the Commerce Categories and named it subcategory HTML. The field type is rich text, this seems to be right field type for HTML.
After I saved the Commerce Category with the subcategory HTML content. I went to the facets_category_cell.tpl file, and added the field into the code. I tried two ways, and I was unable to get the HTML to display. It was always blank.
{{custrecordsubcathtml}}
{{modal.custrecordsubcathtml}}
Below is the code we have currently, to pull the subcategories. I added the custrecordsubcathtml tag below the description.
<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>
NetSuite has said that's is currently not possible to display this data onto a commerce category, if I wanted to, I could edit the DEV SSP pages; they didn't tell me anything else.
Would anyone happen to know where I can go to allow for this field to display?