markovo Posted August 22, 2017 Share Posted August 22, 2017 Hello all! My question is very simple: How can I move the orange module under the shopping cart button? Link to comment Share on other sites More sharing options...
BonPresta Posted August 22, 2017 Share Posted August 22, 2017 Hello all! My question is very simple: How can I move the orange module under the shopping cart button? You need to add a hook to your module file php in - function install $this->registerHook('productActions') public function hookProductActions() { return $this->hookDisplayHome(); } and add new function - hookProductActions Only replace the hook (hookDisplayHome) with your own 1 Link to comment Share on other sites More sharing options...
markovo Posted August 22, 2017 Author Share Posted August 22, 2017 (edited) So, I put the ( $this->registerHook('productActions') && ) line here public function install() { if (Shop::isFeatureActive()) Shop::setContext(Shop::CONTEXT_ALL); return parent::install() && $this->registerHook('productActions') && $this->registerHook('header') && $this->registerHook('displayRightColumnProduct') && $this->registerHook('displayShoppingCart')&& Configuration::updateValue('CREDITTBI_NAME', 'tbi credit'); } and added the (........................................ public function hookProductActions(){return $this->hookDisplayRightColumn();} ...............................................) code here: public function hookProductActions() { return $this->hookDisplayRightColumn(); } public function hookDisplayLeftColumnProduct($params) { return $this->hookDisplayRightColumnProduct($params); } But nothing happens... Edited August 22, 2017 by markovo (see edit history) Link to comment Share on other sites More sharing options...
BonPresta Posted August 22, 2017 Share Posted August 22, 2017 The module needs to be reinstalled 1 Link to comment Share on other sites More sharing options...
markovo Posted August 22, 2017 Author Share Posted August 22, 2017 So I have to copy the edited php file in the zip and install it from there? Link to comment Share on other sites More sharing options...
selectshop.at Posted August 22, 2017 Share Posted August 22, 2017 So I have to copy the edited php file in the zip and install it from there? If you didn't cloned or added a new module, than not. If you changed the files of the module or added an override, than simply go to modules list, and deinstall and install the module again to take effect. 1 Link to comment Share on other sites More sharing options...
BonPresta Posted August 22, 2017 Share Posted August 22, 2017 Just reinstall As in the screenshot 1 Link to comment Share on other sites More sharing options...
markovo Posted August 22, 2017 Author Share Posted August 22, 2017 Well, I have reset the module and now the product pages wont load, there is just a white screen. Obviously my code is wrong... Link to comment Share on other sites More sharing options...
prestahero.com Posted August 23, 2017 Share Posted August 23, 2017 Well, I have reset the module and now the product pages wont load, there is just a white screen. Obviously my code is wrong... BontaPres gave a right solution, by may be there is error in your code syntax, you can try to enable dev to see the errors, open config/defines.inc.php find define('_PS_MODE_DEV_', false); and change it to define('_PS_MODE_DEV_', true); 1 Link to comment Share on other sites More sharing options...
markovo Posted August 23, 2017 Author Share Posted August 23, 2017 Actually I just managed to do it. I just used the original hook and renamed it "ProductActions". Now works like a charm, just needs some css.. Thank you for your answers! I learned something new! 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