Jump to content

[SOLVED]Warning: Function addCSS() is deprecated i


Recommended Posts

I have this warning the message is very clear and precise but I dont have any idea how to fix it

 

Warning: Function addCSS() is deprecated in /home/alafanta/public_html/modules/blocknewsletter/blocknewsletter.php on line 281

in /home/alafanta/public_html/classes/Tools.php on line 1845

 

I need help Please.

Link to comment
Share on other sites

Thanks razaro

can you a little more specific please.

in line 281 I have this

 

Tools::addCSS(($this->_path).'blocknewsletter.css', 'all');

}

 

in line 1845

 

Logger::addLog($message, 3, $class);

}

 

which one I should switch for

 

Thanks for your time

Link to comment
Share on other sites

What version of Prestashop are you using and do you use some specific theme ?

 

In default 1.5.4.1 modules/blocknewproducts/blocknewproducts.php

 

public function hookHeader($params)
{
 $this->context->controller->addCSS(($this->_path).'blocknewproducts.css', 'all');
}

  • Like 1
Link to comment
Share on other sites

  • 4 months later...
×
×
  • Create New...