stratboy Posted May 13, 2013 Share Posted May 13, 2013 Ciao, ho fatto un modulo semi-vuoto, solo per test. Sia installandolo che disinstallandolo (in admin/positions), continuo ad avere sto errore: 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 La classe l'ho praticamente quasi svuotata ma ancora ho quel warning. La classe è la seguente: <?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 ?> Qualcuno sa perché mi esce quel messaggio? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now