GoGoMo Posted February 15, 2013 Share Posted February 15, 2013 How do I hook the New Products block into the Homepage content beneath the Image Slider and Featured Products? When I click Transplant a module to try to hookin the New Products module into Homepage content displayhome I get the following error This module cannot be transplanted to this hook. I tried changing the position of the New Products Block using live edit but the position change wouldn't take effect. When I selected unhook selection to remove New Products block from the Header of pages but this left things looking really messy in the right column so I restored the hook. I have Prestashop v1.5.3.1 installed on localhost Xampp v1.8.1. Windows 7 Professional 32-bit Link to comment Share on other sites More sharing options...
doubleD Posted February 15, 2013 Share Posted February 15, 2013 (edited) How do I hook the New Products block into the Homepage content beneath the Image Slider and Featured Products? When I click Transplant a module to try to hookin the New Products module into Homepage content displayhome I get the following error This module cannot be transplanted to this hook. I tried changing the position of the New Products Block using live edit but the position change wouldn't take effect. When I selected unhook selection to remove New Products block from the Header of pages but this left things looking really messy in the right column so I restored the hook. I have Prestashop v1.5.3.1 installed on localhost Xampp v1.8.1. Windows 7 Professional 32-bit You will need to open blocknewproducts.php and add: public function hookDisplayHome($params) { return $this->hookRightColumn($params); } Befor or after: public function hookLeftColumn($params) { return $this->hookRightColumn($params); } Then you'll be able to transplant the module into home page content. Edited February 15, 2013 by doubleD (see edit history) 2 Link to comment Share on other sites More sharing options...
mountainWalker Posted April 16, 2013 Share Posted April 16, 2013 Hy doubleD, thanx, this realy helped me! Link to comment Share on other sites More sharing options...
syntaxed Posted August 13, 2013 Share Posted August 13, 2013 doubleD, thanks for the help, although it appears that the block is not suitable to be placed at homepage content in my site Link to comment Share on other sites More sharing options...
AndreeaR Posted February 24, 2014 Share Posted February 24, 2014 How can i add more products in New Products block ? I want them to look like this https://www.dropbox.com/s/g5rnxat7d9bpbrl/12121211.jpg What and where I should change the code. Tnx All Link to comment Share on other sites More sharing options...
cygumil Posted March 4, 2014 Share Posted March 4, 2014 You will need to open blocknewproducts.php and add: public function hookDisplayHome($params) { return $this->hookRightColumn($params); } Befor or after: public function hookLeftColumn($params) { return $this->hookRightColumn($params); }Then you'll be able to transplant the module into home page content. Hi doubleD, thank you for the nice share Link to comment Share on other sites More sharing options...
AndreeaR Posted March 4, 2014 Share Posted March 4, 2014 Tnx Link to comment Share on other sites More sharing options...
vekia Posted March 4, 2014 Share Posted March 4, 2014 btw. instead of changing hooks, it's also necessary to modify css styles and tpl file of module. if you're looking for complete solution, check this free module: http://www.prestashop.com/forums/topic/278949-free-module-homepage-featured-new-products-block/ 1 Link to comment Share on other sites More sharing options...
Przemysław Suszek Posted November 12, 2014 Share Posted November 12, 2014 Hi, I want to display new products in my home page like in tab content so in file blocknewproducts.php I add: public function hookdisplayHome($params) { if (!$this->isCached('blocknewproducts_home.tpl', $this->getCacheId('blocknewproducts-home'))) { $this->smarty->assign(array( 'new_products' => BlockNewProducts::$cache_new_products, 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), 'homeSize' => Image::getSize(ImageType::getFormatedName('home')) )); } if (BlockNewProducts::$cache_new_products === false) return false; return $this->display(__FILE__, 'blocknewproducts_home.tpl', $this->getCacheId('blocknewproducts-home')); } and the problem is why sometimes it's work and another time don't. Of course I clean cache and add this module to thoose hooks: displayHomeTab, displayHomeTabContent bcs It's work better with this hooks or maybe I have luck. Thanks for help. Kind regards 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