【问题标题】:Xcart Search Module issueXcart 搜索模块问题
【发布时间】:2016-04-30 10:24:08
【问题描述】:

我在搜索模块中遇到了这个语法错误。有人可以看看这是什么确切的问题。

// This is the path to the fts_instant_product_search.php file you uploaded.
{php}$x=parse_url($GLOBALS['smarty']->_tpl_vars['current_location']);$GLOBALS['smarty']->assign('searchPath',$x['path']);{/php}
searchPath = "{$searchPath}/";

它会产生这个错误:

PHP 致命错误:未捕获 --> Smarty 编译器:语法错误 模板 “/home/noveltie/public_html/xcart475/skin/lumino_responsive/customer/fts_instant_product_search.tpl” 在第 79 行 "{php}$x=parse_url($GLOBALS['smarty']->_tpl_vars['current_location']);$GLOBALS['smarty']->assign('searchPath',$x['path']); {/php}" 未知标签“php”

【问题讨论】:

    标签: php x-cart


    【解决方案1】:

    X-Cart 4.7.5 使用 Smarty 版本 3.1,它不允许 {php} 标签: http://www.smarty.net/docs/en/language.function.php.tpl

    重要通知

    {php} 标签已从 Smarty 中弃用,不应使用。 将您的 PHP 逻辑放在 PHP 脚本或插件函数中。

    从 Smarty 3.1 开始,{php} 标签只能从 SmartyBC 获得。

    您的选择是:

    1. 联系皮肤开发者并要求他们更改皮肤的代码,使其与 smarty 3.1 兼容
    2. 从此处安装上述向后兼容性包装器: http://www.smarty.net/docs/en/bc.tpl

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多