How do I add another context variable to a templat...
# suitecommerce
m
How do I add another context variable to a template file in SCA? I want to add a “short description” field. Does this have anything to do with field sets or the backend section in configuration?
m
@Nick So I need to create an extension to do this? There’s nothing in the admin panel that allows this functionality?
n
You can use the SC Custom Fields extension, I think that can cover your use case of adding a short description (on the product detail page I guess) https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/subsect_156174139171.html
m
Since I want to add it to the Facets.Item view (category page, not item page) it seems like that extension wouldn’t work… unless I’m mistaken, but using {{log this}} on that template doesn’t yield my already existing custom fields from that extension that are on the PDP
m
Try the following handlebar in your code. You will need to add your custom item field to to the search fieldsets, and potentially other fieldsets as well {{model.custitem_customitemfield}}
m
No luck - model itself returns undefined and so does any combination of using the field
m
You can add an extension, then find the view file where you want to add the variable, and extend the view file. Like this: