Error in compiling product.tpl using smarty

妖精的绣舞 提交于 2019-12-11 04:14:52

问题


I have tried to compile the this tpl file using smarty. My php file is this. But I am being shown the error message

( ! ) Fatal error: Uncaught --> Smarty Compiler: Syntax error in template ".\templates\product.tpl" on line 94 "var doesntExist = '{l s='This combination does not exist for this product. Please choose another.' js=1}';" unknown tag "l" <-- thrown in C:\wamp\www\Smarty\libs\sysplugins\smarty_internal_templatecompilerbase.php on line 94

Can anyone please help me how to fix this error?


回答1:


The problem appears at:

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

The question is what is here l - is that Smarty function? If yes, it appears it's not loaded properly and if it should be plain text from some reason, you might try putting it into {literal}:

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


来源:https://stackoverflow.com/questions/26906824/error-in-compiling-product-tpl-using-smarty

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!