2016-04-30 2 views
0

Я столкнулся с этой синтаксической ошибкой в ​​моем модуле поиска. Может кто-нибудь, пожалуйста, рассмотрите это, что точная проблема.Проблема модуля поиска Xcart

// 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 Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/home/noveltie/public_html/xcart475/skin/lumino_responsive/customer/fts_instant_product_search.tpl" on line 79 "{php}$x=parse_url($GLOBALS['smarty']->_tpl_vars['current_location']);$GLOBALS['smarty']->assign('searchPath',$x['path']);{/php}" unknown tag "php" <-- thrown in /home/xxx/public_html/xcart475/include/lib/smarty3/sysplugins/smarty_internal_templatecompilerbase.php on line 79

ответ

1

X-Cart 4.7.5 использует Smarty версии 3.1, которая не допускает {PHP} тег: http://www.smarty.net/docs/en/language.function.php.tpl

IMPORTANT NOTICE

{php} tags are deprecated from Smarty, and should not be used. Put your PHP logic in PHP scripts or plugin functions instead.

As of Smarty 3.1 the {php} tags are only available from SmartyBC .

Ваши варианты являются:

  1. Связаться с разработчиком кожи и попросить их, чтобы изменить код кожи, так что было бы совместимо с Smarty 3.1
  2. Установить вышеупомянутую обратную совместимость обертку здесь: http://www.smarty.net/docs/en/bc.tpl