Jump to content

Warning: Function displayHeader() is deprecated


Recommended Posts

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

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

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

×
×
  • Create New...