vince670 Posted July 12, 2013 Share Posted July 12, 2013 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 More sharing options...
razaro Posted July 12, 2013 Share Posted July 12, 2013 http://www.prestashop.com/forums/index.php?/topic/208918-errors-and-bugs-how-do-i-fix-these/page__view__findpost__p__1030233 Link to comment Share on other sites More sharing options...
vince670 Posted July 12, 2013 Author Share Posted July 12, 2013 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 More sharing options...
vince670 Posted July 12, 2013 Author Share Posted July 12, 2013 I'm guessing change this line Tools::addCSS(($this->_path).'blocknewsletter.css', 'all'); } for this Tools::addCSS(' YOUR_CSS.css'); $this->context->controller->addCSS(' YOUR_CSS.css', 'all'); Link to comment Share on other sites More sharing options...
razaro Posted July 12, 2013 Share Posted July 12, 2013 Yes sorry for not being too clear thought that link was enough. Tools::addCSS(' YOUR_CSS.css');$this->context->controller->addCSS(' YOUR_CSS.css', 'all'); Link to comment Share on other sites More sharing options...
vince670 Posted July 12, 2013 Author Share Posted July 12, 2013 Thanks Razaro I try it! didn't work the error disappear just deleting the newsletter block unfortunately is not a solution. Thanks again for your time Link to comment Share on other sites More sharing options...
razaro Posted July 12, 2013 Share Posted July 12, 2013 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'); } 1 Link to comment Share on other sites More sharing options...
vince670 Posted July 12, 2013 Author Share Posted July 12, 2013 no Razaro is just the default theme, and Prestashop 1.5.4.1 I made some modifications Alafanta.com I will try one more time and after change I will force compilation Link to comment Share on other sites More sharing options...
vince670 Posted July 12, 2013 Author Share Posted July 12, 2013 Razaro THANK YOU works now I need to move to the footer. I was ready to give up with prestashop Can I make a small donation? Thanks again Link to comment Share on other sites More sharing options...
razaro Posted July 12, 2013 Share Posted July 12, 2013 No donation needed, glad it works. Good luck with website, looks like you have nice products. Link to comment Share on other sites More sharing options...
Rhobur Posted November 26, 2013 Share Posted November 26, 2013 @Razaro: I have a similar problem and I have followed your advice as related here, http://www.prestashop.com/forums/topic/208918-errors-and-bugs-how-do-i-fix-these/?view=findpost&p=1470775 Still doesn't seem to load the modified css. Any advice? Regards, Link to comment Share on other sites More sharing options...
Recommended Posts