ai_99 Posted March 23, 2013 Share Posted March 23, 2013 (edited) Hi, please tell me what i do wrong. I try to write new module, and when i try to install it, i have error: blockheadercontacts (parse error in /modules/blockheadercontacts/blockheadercontacts.php)blockheadercontacts (class missing in /modules/blockheadercontacts/blockheadercontacts.php) I try to delete all code, and this construction work fine: <?php if (!defined('_PS_VERSION_')) exit; class BlockHeaderContacts extends Module { } ?> But when i try to add public function __construct() i have error blockheadercontacts (parse error in /modules/blockheadercontacts/blockheadercontacts.php)blockheadercontacts (class missing in /modules/blockheadercontacts/blockheadercontacts.php) again. <?php if (!defined('_PS_VERSION_')) exit; class BlockHeaderContacts extends Module { public function __construct() { $this->name = 'blockheadercontacts' $this->tab = 'front_office_features'; $this->author = 'Developer Name'; $this->version = 1.0; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('Shop contacts info block'); $this->description = $this->l('Adds a block that displays information about the shop contacts to header'); } } ?> What is wrong in this code? Edited March 28, 2013 by ai_99 (see edit history) Link to comment Share on other sites More sharing options...
math_php Posted March 24, 2013 Share Posted March 24, 2013 (edited) Hi If you remove public ? function __construct() There is a missing ; $this->name = 'blockheadercontacts' :-) Regards Edited March 24, 2013 by math_php (see edit history) Link to comment Share on other sites More sharing options...
ai_99 Posted March 28, 2013 Author Share Posted March 28, 2013 thanks for respnse. ; missing in this post i solved problem - i'm copied working module from my shop, rename it, copied all my code to new module. after that module installs correct (no changes in my code). Maybe it's a cms bug. I still don't know wy (i try create new module and have same problem with install it). 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