Blawdi Posted April 28, 2014 Share Posted April 28, 2014 (edited) Hello, on MODULE Block new products Limit Left column I would limit the number display in the left column (15).But not display in the middle. (24)What is the code change?thank you Edited April 28, 2014 by Bladinium (see edit history) Link to comment Share on other sites More sharing options...
newtopshops Posted September 2, 2014 Share Posted September 2, 2014 I have the same question. 12 new products fit my homepage nice, but too much for left column block. Would also be nice when the new products are displayed at random. Link to comment Share on other sites More sharing options...
vekia Posted September 2, 2014 Share Posted September 2, 2014 open module .php file, there is a code like: public function hookRightColumn($params) { if (!$this->isCached('blocknewproducts.tpl', $this->getCacheId())) { if (!isset(BlockNewProducts::$cache_new_products)) BlockNewProducts::$cache_new_products = $this->getNewProducts(); $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.tpl', $this->getCacheId()); } change it to: public function hookRightColumn($params) { if (!$this->isCached('blocknewproducts.tpl', $this->getCacheId())) { if (!isset(BlockNewProducts::$cache_new_products)) BlockNewProducts::$cache_new_products = $this->getNewProducts(); $this->smarty->assign(array( 'new_products' => Product::getNewProducts((int) $this->context->language->id, 0, 15), '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.tpl', $this->getCacheId()); } where 15 is a number of products you want to display 1 Link to comment Share on other sites More sharing options...
Recommended Posts