Prestashop Module Anywhere Slideshow Problem in PS 1.5

Anywhere Slideshow is one of Prestashop modules experiencing problem during Prestashop major updates from PS 1.4 to PS 1.5.

Displays slideshow using smarty function, for example {displaySlideshow id=1}, will causing SmartyCompilerException error unknown tag “displaySlideshow”. This problem caused by displaySlideshow function is not registered in smarty.

To solve the problem, add this line of code in pslideshows.php function hookHeader

$smarty->registerPlugin(“function”, “displaySlideshow”, array(__CLASS__, ‘displaySlideshow’));

public function hookHeader($params)
{
global $smarty, $cookie, $css_files, $js_files;

$css_files[_MODULE_DIR_.$this->name.'/jquery.bxSlider/bx_styles.css'] = 'screen';
$js_files[] = _MODULE_DIR_.$this->name.'/jquery.bxSlider/jquery.bxSlider.min.js';

if (method_exists($smarty, 'register_function')) {
$smarty->register_function('displaySlideshow', array(__CLASS__, 'displaySlideshow'));
}elseif(method_exists($smarty->register, 'registerPlugin')){
if(!isset($smarty->registered_plugins['function']['displaySlideshow']))
$smarty->registerPlugin("function", "displaySlideshow", array(__CLASS__, 'displaySlideshow'));
}
$smarty->registerPlugin("function", "displaySlideshow", array(__CLASS__, 'displaySlideshow'));
}

update

Check comment for module updates and discussion. Feel free to ask 🙂