Jump to content

[solved] [modules installation] - Cannot modify header information error


stratboy

Recommended Posts

Hi, I made a quite empty test module. I keep getting this error both on install and uninstall (on admin/positions):

 

Warning: Cannot modify header information - headers already sent by (output started at [...] /prestashop/modules/customshippingrates/customshippingrates.php:93) in [...] /prestashop/classes/Tools.php on line 141

 

The class is really simple now, I emptied almost everything:

 

<?php
/*
* 2013 Luca Reghellin
*/

//controlla l'esistenza della costante (una qualunque).
//Serve solo per prevenire che questo file venga direttamente caricato da hackers
if (!defined('_PS_VERSION_')) exit;

class CustomShippingRates extends Module{
 public function __construct(){
$this->name = 'customshippingrates';
$this->tab = 'shipping_logistics';
$this->version = '1.0';
$this->author = 'Luca Reghellin';
$this->need_instance = 0;
$this->dependencies = array();

parent::__construct();

$this->displayName = $this->l('Custom shipping rates');
$this->description = $this->l('Shipping rates based on items volumes.');

$this->confirmUninstall = $this->l('Are you sure you want to uninstall?');

 //questo è solo un esempio, non è necessario
if (!Configuration::get('CUSTOMSHIPPINGRATES_NAME')) $this->warning = $this->l('No name provided');
 }//END CONSTRUCT
public function install(){
 Configuration::updateValue('CUSTOMSHIPPINGRATES_NAME', 'Custom shipping rates');

return parent::install() &&
   //$this->registerHook('actionCartSave') &&
   $this->registerHook('displayHome');
}
public function uninstall(){
  if (!parent::uninstall() ||
  !Configuration::deleteByName('CUSTOMSHIPPINGRATES_NAME'))
  return false;
  return true;
}
public function hookActionCartSave(){

}

public function hookDisplayHome(){
}//end display top
}//END CLASS

?>


 

 

Could you help me to find out the problem?

Edited by stratboy (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...