ayush Posted May 27, 2013 Share Posted May 27, 2013 Hi I want to show my cms page inside blocknew products , i used this code for show it but its now working good , $my_page = new CMS(1, self::$cookie->id_lang); self::$smarty->assign('my_page',$my_page); its showing some errors , if any one have idea share it please , thanks Link to comment Share on other sites More sharing options...
vekia Posted May 27, 2013 Share Posted May 27, 2013 what error you've got? can you paste it here? and what PS version you use? Link to comment Share on other sites More sharing options...
ayush Posted May 27, 2013 Author Share Posted May 27, 2013 (edited) Thanks for replaying vikea , I am using 1.5.3.1 , I think its a problem of class CMS is not getting in module , And its difficult to include core class to the module i have't much idea about it ! Edited May 27, 2013 by ayush (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 27, 2013 Share Posted May 27, 2013 here is the working code: 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( 'my_page' => new CMS(1, $this->content->lang->id), 'new_products' => $newProducts, 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), )); return $this->display(__FILE__, 'blocknewproducts.tpl'); } use this function instead the old one, should work (tested it and it works) Link to comment Share on other sites More sharing options...
Recommended Posts