Xcart搜索模块问题

时间:2016-04-30 10:24:09

标签: php x-cart

我在搜索模块中遇到此语法错误。有人可以调查一下这究竟是什么问题。

// 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的'] - >分配( '搜索路径',$ X [ '路径'] ); {/ PHP}”   未知标签“php”< - 抛入   /home/xxx/public_html/xcart475/include/lib/smarty3/sysplugins/smarty_internal_templatecompilerbase.php   第79行

1 个答案:

答案 0 :(得分: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