Are Posted September 3, 2013 Share Posted September 3, 2013 Hello, after installing the lastest ps, the displaying of new products on frontpage disappered. If i click on new products label, they all appear as before. I tried resetting/disabling but no change. the log gives apache2: PHP Notice: Undefined variable: newProducts in /prestashop/modules/blocknewproducts/blocknewproducts.php on line 118 below is the function from the file. Any ideas where to begin? --- $this->smarty->assign(array( 'new_products' => $newProducts, 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), )); Link to comment Share on other sites More sharing options...
dangee Posted September 10, 2013 Share Posted September 10, 2013 HI, I had the same error, so I just replaced the "public function hookRightColumn($params)" with the one from ps 1.5.4.1 (see below) and it worked ! public function hookRightColumn($params) { $newProducts = Product::getNewProducts((int)($params['cookie']->id_lang), 0, (int)(Configuration::get('NEW_PRODUCTS_NBR'))); if (!$newProducts && !Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY')) return; $this->smarty->assign(array( 'new_products' => $newProducts, 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), )); return $this->display(__FILE__, 'blocknewproducts.tpl'); } 1 Link to comment Share on other sites More sharing options...
Are Posted September 10, 2013 Author Share Posted September 10, 2013 HI, I had the same error, so I just replaced the "public function hookRightColumn($params)" with the one from ps 1.5.4.1 (see below) and it worked ! public function hookRightColumn($params) { $newProducts = Product::getNewProducts((int)($params['cookie']->id_lang), 0, (int)(Configuration::get('NEW_PRODUCTS_NBR'))); if (!$newProducts && !Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY')) return; $this->smarty->assign(array( 'new_products' => $newProducts, 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), )); return $this->display(__FILE__, 'blocknewproducts.tpl'); } Yes, it worked.. thanks. Link to comment Share on other sites More sharing options...
vekia Posted September 10, 2013 Share Posted September 10, 2013 thanks for solution, im going to mark this topic as solved Link to comment Share on other sites More sharing options...
dangee Posted September 10, 2013 Share Posted September 10, 2013 Link to comment Share on other sites More sharing options...
rintro Posted September 11, 2013 Share Posted September 11, 2013 Worked for me as well. thanks! Link to comment Share on other sites More sharing options...
Recommended Posts