devilsown Posted April 4, 2013 Share Posted April 4, 2013 I would really aprecate any help with these error codes nozzle (parse error in /modules/nozzle/nozzle.php) nozzle (class missing in /modules/nozzle/nozzle.php) I have this in the main folder named nozzle/ and the tpl file. nozzle\views\templates\front\nozzle.tpl I can only think of it being extra {} And i personal see the class it says that is missing so it makes me think its something before its called or the main bracket. <?php if (!defined('_PS_VERSION_')) exit; class nozzle extends Module { public function __construct() { $this->name = 'nozzle'; $this->tab = 'front_office_features'; $this->version = '1.0'; $this->author = 'chance mcclurkin'; $this->need_instance = 0; $this->ps_versions_compliancy = array('min' => '1.5', 'max' => '1.5'); parent::__construct(); $this->displayName = $this->l('Nozzle Caculator'); $this->description = $this->l('Tells user what size nozzle to run'); } public function install() { if (Shop::isFeatureActive()) Shop::setContext(Shop::CONTEXT_ALL); return parent::install() && $this->registerHook('leftColumn') && $this->registerHook('header') && } public function uninstall() { return parent::uninstall() && Configuration::deleteByName('NOZZLE_NAME'); } public function hookDisplayLeftColumn($params) { $this->context->smarty->assign( array( 'my_module_name' => Configuration::get('NOZZLE_NAME'), 'my_module_link' => $this->context->link->getModuleLink('nozzle', 'display') ) ); return $this->display(__FILE__, 'nozzle.tpl'); } public function hookDisplayRightColumn($params) { return $this->hookDisplayLeftColumn($params); } public function hookDisplayHeader() { $this->context->controller->addjs($this->_path.'xxxx.js', 'all'); } } Link to comment Share on other sites More sharing options...
razaro Posted April 4, 2013 Share Posted April 4, 2013 public function install() { if (Shop::isFeatureActive()) Shop::setContext(Shop::CONTEXT_ALL); return parent::install() && $this->registerHook('leftColumn') && $this->registerHook('header') && } Extra && and ; is missing Link to comment Share on other sites More sharing options...
devilsown Posted April 4, 2013 Author Share Posted April 4, 2013 (edited) Thanks very much for your help it got it all up and going. Now i got 1 last small issue with this new modual. Its bascaly a form that runs some math. which i don't want everyone to see the math in a js file. When someone clicks the run button it runs a js file. Inside the js file it calls a php file with all the math. So the million dollar isssue is do you know how i can change this link the js file so it looks in the moduals folder for the php file? i would perferr for all the moduals files to sit inside the moduals folder. function doMath(){ var url = "methbackend.php?op=" + document.getElementById('op').value; Edited April 4, 2013 by devilsown (see edit history) Link to comment Share on other sites More sharing options...
razaro Posted April 5, 2013 Share Posted April 5, 2013 If you need path to module check this {/literal}url: "{$module_dir}sendtoafriend_ajax.php",{literal} from sendtoafriend-extra.tpl. And {$module_dir} is variable already defined in Module.php. 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