innocuous Posted October 16, 2012 Share Posted October 16, 2012 Hi, PS 1.5.1, default theme. How can I place 3 horizontal advertisement blocks above the featured products on home page? I have seen this done in many themes though with PS 1.4 Thanks Link to comment Share on other sites More sharing options...
vekia Posted October 16, 2012 Share Posted October 16, 2012 Hi, PS 1.5.1, default theme. How can I place 3 horizontal advertisement blocks above the featured products on home page? I have seen this done in many themes though with PS 1.4 Thanks you use default advertisement block or other module? You must transplant module to home hook, go to back office, next to modules tab, and try to transplant your module to correct hook. Link to comment Share on other sites More sharing options...
innocuous Posted October 16, 2012 Author Share Posted October 16, 2012 I am using default Block Advertising v0.5. I am unable to transplant it to displayHome. It shows This module cannot be transplanted to this hook. I am able to transplant it to displayHeader but it doesn't show up anywhere. Link to comment Share on other sites More sharing options...
vekia Posted October 16, 2012 Share Posted October 16, 2012 (edited) I am using default Block Advertising v0.5. I am unable to transplant it to displayHome. It shows This module cannot be transplanted to this hook. I am able to transplant it to displayHeader but it doesn't show up anywhere. ok so you must edit the main php file of this module. So, open the blockadvertising.php file and add right after: /** * Returns module content * * @param array $params Parameters * @return string Content */ this code: function hookhome($params){ global $smarty, $protocol_content; Tools::addCSS(($this->_path).'blockadvertising.css', 'all'); $smarty->assign('image', $protocol_content.$this->adv_img); $smarty->assign('adv_link', $this->adv_link); return $this->display(__FILE__, 'blockadvertising.tpl'); } save file and try to transplant now. It works properly now ! Edited October 16, 2012 by vekia (see edit history) Link to comment Share on other sites More sharing options...
innocuous Posted October 16, 2012 Author Share Posted October 16, 2012 There is no @return string content */ in blockadvertising.php. I found this right at the end of the file: public function hookHeader($params) { $this->context->controller->addCSS($this->_path.'blockadvertising.css', 'all'); } Added your code after the above and transplanted to module. It worked. However now the block is shown after featured products. How can I move it above featured products? Also I want to show 3 different blocks with different images/links. I'll have to copy paste the module folder as blockadvertising1, blockadvertising2 etc and modify code accordingly? Which file do I have to edit to change the homepage centre column layout? I have hidden the right and left columns. Thanks for all the help! Link to comment Share on other sites More sharing options...
innocuous Posted October 17, 2012 Author Share Posted October 17, 2012 Vekia how do I add multiple advertisement blocks and how do I move above featured products? Can you tell me which tpl file controls frontpage layout? Thanks! Link to comment Share on other sites More sharing options...
vekia Posted October 17, 2012 Share Posted October 17, 2012 Vekia how do I add multiple advertisement blocks and how do I move above featured products? Can you tell me which tpl file controls frontpage layout? Thanks! hi you must change the module position in modules -> position section. Find "hoome" hook there and move blockadvertising to top of the list. you must edit blockadvertising.tpl file Before any changes in tempalte files turn force compile to on (performance in advanced tab) Link to comment Share on other sites More sharing options...
innocuous Posted October 17, 2012 Author Share Posted October 17, 2012 Sometimes we get so involved in coding that we forget built in options to do simple stuff! Thanks a ton! Link to comment Share on other sites More sharing options...
innocuous Posted November 9, 2012 Author Share Posted November 9, 2012 Ok 3 advert blocks show up side by side. BUT how do we edit them? They all show the same image/link. We could do manually but that would not solve the purpose. From BO we can modify only one of them. Link to comment Share on other sites More sharing options...
badfreek Posted August 11, 2013 Share Posted August 11, 2013 Hello - did you managed to solve that problem? Link to comment Share on other sites More sharing options...
vekia Posted August 12, 2013 Share Posted August 12, 2013 Hello - did you managed to solve that problem? you're asking because you've got the same problem? if so, please clarify a bit what ps version you use, what kind of problem you've got then i will help you with pleasure 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