使用 smarty 编译 product.tpl 时出错


Error in compiling product.tpl using smarty

我尝试使用 smarty 编译这个 tpl 文件。我的php文件是这个。但是我看到错误消息

( !致命错误:未捕获 --> Smarty 编译器:模板".''templates''product.tpl"在第 94 行"var not Exists = '{l s='此产品组合不存在的语法错误。请选择另一个。 js=1}';" 未知标记 "l" <-- 在第 94 行的 C:''wamp''www''Smarty''libs''sysplugins''smarty_internal_templatecompilerbase.php 中抛出

任何人都可以帮我解决此错误吗?

问题出现在:

var doesntExist = '{l s='This combination does not exist for this product. Please choose another.' js=1}';

问题是这里l是什么 - 这是 Smarty 函数吗?如果是,它似乎没有正确加载,如果出于某种原因它应该是纯文本,您可以尝试将其放入{literal}

var doesntExist = '{literal}{l s='This combination does not exist for this product. Please choose another.' js=1}{/literal}';