0

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.

snieguu
  • 2,073
  • 2
  • 20
  • 39
Salman
  • 333
  • 4
  • 18

1 Answers1

0

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.

bknights
  • 14,408
  • 2
  • 18
  • 31
  • The file in which i have created Handlebars there are already defined some Handlebars which are working but new added handlebar not working. – Salman Apr 11 '19 at 19:58
  • No. First you should add your code to a custom scan module following the guidelines in my answer. If that still doesn’t work then post your module code and we can go from there – bknights Apr 11 '19 at 23:37