lmarcelocc Posted February 14, 2014 Share Posted February 14, 2014 Hello all, I'm have made a module but only works fine on left column, if I try to transplate it to right column doesn't work as expected :/ I'm not able either to move my module on live edit, either on left or right column. My final functions, on this class, are: class cttTracking extends Module { public function hookDisplayLeftColumn($params) { $shopUrl = $_SERVER['SERVER_NAME']; $this->context->smarty->assign( array( 'myModuleName' => Configuration::get('MYMODULE_NAME'), 'myModuleLink' => $this->context->link->getModuleLink('cttTracking', 'display'), 'shopUrl' => $shopUrl ) ); return $this->display(__FILE__, 'cttTracking.tpl'); } public function hookDisplayRightColumn($params) { return $this->hookDisplayLeftColumn($params); } public function hookDisplayHeader() { $this->context->controller->addCSS($this->_path.'css/style.css', 'all'); $this->context->controller->addCSS(($this->_path).'css/colorbox.css'); $this->context->controller->addJquery(); $this->context->controller->addJS(($this->_path).'js/handleResponse.js'); $this->context->controller->addJS(($this->_path).'js/jquery.colorbox-min.js'); } } Off course I have my own functions inside this class on other file outside this class using ajax agent and some other stuf.Here you can see what happen:http://www.prestashop.bijouart.pt/index.phpI have just transplate it to right column. Thanks in advance. Marcelo Link to comment Share on other sites More sharing options...
vekia Posted February 15, 2014 Share Posted February 15, 2014 and where is code for right column ? hookDisplayRightColumn ? Link to comment Share on other sites More sharing options...
lmarcelocc Posted February 15, 2014 Author Share Posted February 15, 2014 (edited) and where is code for right column ? hookDisplayRightColumn ? Hello, thanks for your reply. This is not enough? hookDisplayRightColumn($params) { return $this->hookDisplayLeftColumn($params); } I thought this was to do a copy of hookDisplayLeftColumn...Am I thinking wrong? Thanks Edited February 15, 2014 by deepshoot (see edit history) Link to comment Share on other sites More sharing options...
lmarcelocc Posted February 18, 2014 Author Share Posted February 18, 2014 Can you help me Vekia? thanks. Link to comment Share on other sites More sharing options...
vekia Posted February 18, 2014 Share Posted February 18, 2014 hello, sure i can, i just missed your reply your code is OK. but the problem is with js files, you use this module in two positions, js scripts are based on ID of element, this is why first works, second not. you have to use it only one time. Link to comment Share on other sites More sharing options...
lmarcelocc Posted February 18, 2014 Author Share Posted February 18, 2014 So easy, my bad It's working good. I marked as solved. I mean, I'm still not able to use live edit to move my module down/up or to the left/right column. Can you please advise me wich is better to avoid this happen? And there's some option to, if I hook to right column, automatically remove it from left or maybe, some option to only allow one hook at once. Thanks for your precious help Best regards, Marcelo Link to comment Share on other sites More sharing options...
vekia Posted February 18, 2014 Share Posted February 18, 2014 you can use live edit, but in some cases you can use only one position of the module at the same moment, like it is with this one Link to comment Share on other sites More sharing options...
lmarcelocc Posted February 19, 2014 Author Share Posted February 19, 2014 Thank you sir Best regards, Marcelo 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