netsuitesuitecommerce

sca Custom Handlebars Helpers not working


I have created custom Handlebars helpers but its not working and throwing following error.

enter image description here

After adding Handlebars I have restart the local theme but its still throwing error. Can you please help me out. I am working on sca kilimanjaro.


Solution

  • Create a new module in the Modules/third_parties folder to store your new module.

    In that module folder create your helper adder.

    Basically you should follow Netsuite's lead on this. Find the HandlebarsExtras.js in the SuiteCommerce modules folder.

    At a minimum you'd import Handlebars in your define statement and then do a Handlebars.registerHelper call to register your new helper.

    Finally include your additional helpers module in distro.json.