Jump to content

CMS page content show into the module


Recommended Posts

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

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

×
×
  • Create New...