Promokit Posted November 19, 2013 Share Posted November 19, 2013 Hi everyone. Does anybody know what alternative function should I use instead displayHeader()? As I know this function will not supported in prestashop 1.6 Link to comment Share on other sites More sharing options...
NemoPS Posted November 20, 2013 Share Posted November 20, 2013 They will *probably* use initHeader(), but I am not sure, as there is no mention of an alternative function in the FrontController Link to comment Share on other sites More sharing options...
Promokit Posted November 20, 2013 Author Share Posted November 20, 2013 Thank you for suggestion. I tried to use $controller->initHeader(); instead $controller->displayHeader(); but it doesn't work. I even didn't find any examples in any modules. Strange because the function is deprecated, but there is no alternative. Link to comment Share on other sites More sharing options...
NemoPS Posted November 20, 2013 Share Posted November 20, 2013 Yes, it's not currently working, but as they got rid of displayContent for initCOntent, I think that's what they will do on 1.6 Probably Link to comment Share on other sites More sharing options...
Promokit Posted November 20, 2013 Author Share Posted November 20, 2013 Thank you Nemo for your suggestions. But what you can suggest me to do with this warning on my prestashop 1.5? Link to comment Share on other sites More sharing options...
NemoPS Posted November 20, 2013 Share Posted November 20, 2013 How are you using the method at the moment? Link to comment Share on other sites More sharing options...
Promokit Posted November 20, 2013 Author Share Posted November 20, 2013 Here is the part of code: require_once(dirname(__FILE__).'/../../config/config.inc.php'); require_once(dirname(__FILE__).'/../../init.php'); require_once(dirname(__FILE__).'/my.class.php'); $oController = new FrontController(); $oController->init(); $oController->setMedia(); $oController->displayHeader(); Link to comment Share on other sites More sharing options...
Promokit Posted November 21, 2013 Author Share Posted November 21, 2013 Maybe someone else has suggestions Link to comment Share on other sites More sharing options...
i10anniavanti Posted November 22, 2013 Share Posted November 22, 2013 hi, i have same problem Link to comment Share on other sites More sharing options...
bellini13 Posted November 22, 2013 Share Posted November 22, 2013 I think they want you to either use ... 1) If you are creating a new controller, then use the initHeader function. 2) If you are creating a new module, use the hook displayHeader. Prestashop itself deprecated the function, but has not moved to using the "new" approach, they themselves continue to use the deprecated function. Link to comment Share on other sites More sharing options...
Promokit Posted November 22, 2013 Author Share Posted November 22, 2013 Ok, thank you! Only one problem still there. Warning message when debug mode is enabled. Link to comment Share on other sites More sharing options...
bellini13 Posted November 22, 2013 Share Posted November 22, 2013 then disable debug mode Link to comment Share on other sites More sharing options...
Promokit Posted November 22, 2013 Author Share Posted November 22, 2013 (edited) Ok, will wait for prestashop 1.6, hope there it will be clearer Edited November 22, 2013 by Marek Mnishek (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 24, 2013 Share Posted November 24, 2013 in 1.5 you don't have to run displayHeader functions etc. it's enough to run just one: init() function, Link to comment Share on other sites More sharing options...
Recommended Posts