zeratool Posted February 25, 2008 Share Posted February 25, 2008 Hello, Can a module say "Best Seller" which currently appears on the "rightColumn", can also appear on "home" at the same time? Link to comment Share on other sites More sharing options...
tutankhamen Posted February 25, 2008 Share Posted February 25, 2008 Yes and no. Certain modules can't be hooked into certain places because the haven't been designed that way. But if a module can be hooked into, say, "left column blocks" and "product footer" then it can also appear on those places at the same time. Just play around with the transplant feature (Modules > Positions) and see how it goes Link to comment Share on other sites More sharing options...
zeratool Posted February 26, 2008 Author Share Posted February 26, 2008 Thanks for the reply. Im saying is the from the coder's point of view. Im asking if somebody or the authors of prestashop if the architecture will allow it. Im starting to hack the modules as you can on my other post: http://www.prestashop.com/forum/index.php/topic,972.0.html Thanks. Link to comment Share on other sites More sharing options...
tutankhamen Posted February 26, 2008 Share Posted February 26, 2008 Yes, definitely. The whole procedure is actually quite simple. For example, take a look at modules/blockspecials.php Find this: function hookLeftColumn($params) { return $this->hookRightColumn($params); } And after that, add this: function hookHome($params) { global $smarty; if ($special = Product::getRandomSpecial(intval($params['cookie']->id_lang))) $smarty->assign(array( 'special' => $special, 'oldPrice' => number_format($special['price'] + $special['reduction'], 2, '.', '') )); return $this->display(__FILE__, 'blockspecials-home.tpl'); } Now just make a copy of modules/blockspecials/blockspecials.tpl and name it blockspecials-home.tpl. That gives you individual control over the version shown on the Home block. Link to comment Share on other sites More sharing options...
zeratool Posted February 27, 2008 Author Share Posted February 27, 2008 Cool! Thanks man! Btw, have another , do you know how to not display a certain block/module on a specific page? Say the Cart Block, it appears on the home page, but i don't want to appear it on the login page or something, where will I control that? Thanks again. Link to comment Share on other sites More sharing options...
tutankhamen Posted February 27, 2008 Share Posted February 27, 2008 Modules > Positions >Transplant a module > Exceptions Link to comment Share on other sites More sharing options...
zeratool Posted February 27, 2008 Author Share Posted February 27, 2008 All right! Thanks dude! 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