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 🙂

3 thoughts on “Prestashop Module Anywhere Slideshow Problem in PS 1.5”

  1. There were some additional error fixes. I can’t keep record of each errors, so you guys can just download the update here.. download module

    If SmartyCompilerException error unknown tag “displaySlideshow” still occured, try to delete comment function __call in pslideshows.php, then refresh the page. Then uncomment function __call.

  2. hi i need this module, really need diferent slideshows in diferent categories,.. but if i install this fix i cant find slideshows link in admin, can you help??? pls

Leave a Reply

Your email address will not be published. Required fields are marked *