简体   繁体   English

sca自定义手把助手不起作用

[英]sca Custom Handlebars Helpers not working

I have created custom Handlebars helpers but its not working and throwing following error. 我创建了自定义的Handlebars助手,但是它不起作用,并引发以下错误。

在此处输入图片说明

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. 我正在研究sca乞力马扎罗山。

Create a new module in the Modules/third_parties folder to store your new module. 在Modules / third_parties文件夹中创建一个新模块,以存储新模块。

In that module folder create your helper adder. 在该模块文件夹中,创建您的助手添加器。

Basically you should follow Netsuite's lead on this. 基本上,您应该遵循Netsuite的指导。 Find the HandlebarsExtras.js in the SuiteCommerce modules folder. 在SuiteCommerce modules文件夹中找到HandlebarsExtras.js。

At a minimum you'd import Handlebars in your define statement and then do a Handlebars.registerHelper call to register your new helper. 至少您要在define语句中导入Handlebars,然后执行Handlebars.registerHelper调用来注册新的帮助器。

Finally include your additional helpers module in distro.json. 最后,在distro.json中包含您的其他帮助程序模块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM