kindous Posted November 25, 2012 Share Posted November 25, 2012 I have tried to move cart block from left column to the footer i also tried to write it to footer.tpl via copy it from blockcart.tpl, it works, but i have problems with position of that block. I also replaced Hook in blockcart.php i hooked it into footer $this->registerHook('footer') it succesfully register but didint show up its hidden in administration i see "blockcart" in footer. Can someone help pls? Its important for me. i have the same problem with newsletter block. Pls help me. With respect Peter. Link to comment Share on other sites More sharing options...
vekia Posted November 25, 2012 Share Posted November 25, 2012 I have tried to move cart block from left column to the footer i also tried to write it to footer.tpl via copy it from blockcart.tpl, it works, but i have problems with position of that block. I also replaced Hook in blockcart.php i hooked it into footer $this->registerHook('footer') it succesfully register but didint show up its hidden in administration i see "blockcart" in footer. Can someone help pls? Its important for me. i have the same problem with newsletter block. Pls help me. With respect Peter. in blockcart.php you must add function: public function hookfooter($params) { return $this->hookRightColumn($params); } then you must transplant module to footer section in modules -> position tab 1 Link to comment Share on other sites More sharing options...
kindous Posted November 25, 2012 Author Share Posted November 25, 2012 in blockcart.php you must add function: public function hookfooter($params) { return $this->hookRightColumn($params); } then you must transplant module to footer section in modules -> position tab public function install() { if ( parent::install() == false || $this->registerHook('footer') == false || $this->registerHook('header') == false || Configuration::updateValue('PS_BLOCK_CART_AJAX', 1) == false) return false; return true; } public function hookRightColumn($params) { if (Configuration::get('PS_CATALOG_MODE')) return; // @todo this variable seems not used $this->smarty->assign('order_page', strpos($_SERVER['PHP_SELF'], 'order') !== false); $this->assignContentVars($params); return $this->display(__FILE__, 'blockcart.tpl'); } if i replace "public function hookRightColumn($params) {" all web crash Link to comment Share on other sites More sharing options...
kindous Posted November 25, 2012 Author Share Posted November 25, 2012 IT WORKS! this will solve same problem with newsletter block? Link to comment Share on other sites More sharing options...
vekia Posted November 25, 2012 Share Posted November 25, 2012 sure, but you must create correct function i mark this topic as solved Link to comment Share on other sites More sharing options...
kindous Posted November 25, 2012 Author Share Posted November 25, 2012 Pls check www.artmart.cz in footer is Cart but its widht is about 970px. A want 200px width and i cant find it in blockcart.css. Link to comment Share on other sites More sharing options...
kindous Posted November 25, 2012 Author Share Posted November 25, 2012 The size is ok. But i have the same problem with Block newsletter. this module is written something else. public function install() { if (parent::install() == false || $this->registerHook('footer') == false || $this->registerHook('header') == false) return false; Link to comment Share on other sites More sharing options...
vekia Posted November 25, 2012 Share Posted November 25, 2012 try with code below: function hookfooter($params){ return $this->hookLeftColumn($params); } Link to comment Share on other sites More sharing options...
kindous Posted November 25, 2012 Author Share Posted November 25, 2012 Where should i put this code? I mean where exactly. Under what code. sry (...) public function hookDisplayHeader($params) { $this->context->controller->addCSS($this->_path.'blocknewsletter.css', 'all'); } } Link to comment Share on other sites More sharing options...
vekia Posted November 25, 2012 Share Posted November 25, 2012 I edited your post due to the chaotic contents of php file. you must put the code: function hookfooter($params){ return $this->hookLeftColumn($params); } public function hookDisplayHeader($params) { $this->context->controller->addCSS($this->_path.'blocknewsletter.css', 'all'); } // // HERE // } Link to comment Share on other sites More sharing options...
kindous Posted November 25, 2012 Author Share Posted November 25, 2012 I must doing something wrong. I found that code i put this function hookfooter($params){ return $this->hookLeftColumn($params); } and then whole web doesnt work. Anyway Thank you for helping me. Do you want some reward? And dont worry i took care about } etc:) Link to comment Share on other sites More sharing options...
vekia Posted November 25, 2012 Share Posted November 25, 2012 I must doing something wrong. I found that code i put this function hookfooter($params){ return $this->hookLeftColumn($params); } and then whole web doesnt work. Anyway Thank you for helping me. Do you want some reward? And dont worry i took care about } etc:) you can send me PM with file that you use, i can check it for issues Link to comment Share on other sites More sharing options...
PrestaBizz Posted December 18, 2012 Share Posted December 18, 2012 Two questions: 1) Does the fix in post #10 work in 1.5.2.0? 2) Is the fix in post #10 the only change needed to move the newletter block to footer? Thanks. Link to comment Share on other sites More sharing options...
vekia Posted December 18, 2012 Share Posted December 18, 2012 I'm convinced that it will work Link to comment Share on other sites More sharing options...
PrestaBizz Posted December 18, 2012 Share Posted December 18, 2012 Hmmm...I got the following errror when trying to position the newsletter block after having changed and uploaded the file: HTTP-fejl 500 (Internal Server Error). Link to comment Share on other sites More sharing options...
vekia Posted December 18, 2012 Share Posted December 18, 2012 check error log in your apache server logs, you can catch there where the problem occur. can you paste here your modified code? Link to comment Share on other sites More sharing options...
PrestaBizz Posted December 18, 2012 Share Posted December 18, 2012 Attached is the modified part of blocknewsletter.php. Modification is in line 520-522. Link to comment Share on other sites More sharing options...
PrestaBizz Posted December 18, 2012 Share Posted December 18, 2012 The error log just says files does not exist /startup/favicon.ico and /startup/404.shtml! Link to comment Share on other sites More sharing options...
leowls Posted April 1, 2013 Share Posted April 1, 2013 Hi vekia, After I inserted the below code into root\modules\blocknewsletter.php and after that transplanted the newsletter block to footer, my website became blank. function hookfooter($params){ return $this->hookLeftColumn($params); } Is there anything I'm not doing right? Please advice thanks! Link to comment Share on other sites More sharing options...
71newyorker Posted April 1, 2013 Share Posted April 1, 2013 Can some one please help? We have two websites. site 1 - www.eyewearoutlet.ph 1.5.3 default theme site 2 - www.babyoutlet.ph 1.4.7 custom theme We love the regular default footer of site 1, and we want this footer in our site 2. Is this possible? I have been searching all day every for almost a week for an answer now so it would be much appreciated if anyone knows this? Our designer who did the customer design turns out not to know much about development lol, hence why we now have NO footer on site 2, and missing a few footer modules. hes also not contactable anymore. Can anyone help us out? Much love. Link to comment Share on other sites More sharing options...
vekia Posted April 2, 2013 Share Posted April 2, 2013 Can some one please help? you want to create the same footer in shop 2 as in shop 1? I understood it well? Attached is the modified part of blocknewsletter.php. Modification is in line 520-522. you've got duplicated hookfooter function, this is probably main problem. Delete one of them. Hi vekia, After I inserted the below code into root\modules\blocknewsletter.php and after that transplanted the newsletter block to footer, my website became blank. function hookfooter($params){ return $this->hookLeftColumn($params); } Is there anything I'm not doing right? Please advice thanks! where you exactly pasted it? can you provide the piece of code? you can upload file to own post, i will download it and check for errors, Link to comment Share on other sites More sharing options...
leowls Posted April 2, 2013 Share Posted April 2, 2013 Hi vekia, I inserted the code in blocknewsletter between this code near to the bottom of the page, public function hookDisplayHeader($params) { $this->context->controller->addCSS($this->_path.'blocknewsletter.css', 'all'); } //the code pasted here } Then I transplant the Newsletter Block to the displayFooter in the back office. Attached is the file, many thanks for your help! blocknewsletter.php Link to comment Share on other sites More sharing options...
Recommended Posts