document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. public function hookDisplayHome($params)
  2. {
  3.     $controller = new FrontController();
  4.     $controller->productSort();        
  5.     $category = new Category(Context::getContext()->shop->getCategory(), (int)Context::getContext()->language->id);
  6.     $nbProducts = $category->getProducts((int)Context::getContext()->language->id, NULL, NULL, \'position\', NULL, true);
  7.     $controller->pagination($nbProducts);
  8.     $products = $category->getProducts((int)Context::getContext()->language->id, intval($controller->p), intval($controller->n), $controller->orderBy, $controller->orderWay);
  9.        
  10.     $this->smarty->assign(
  11.         array(
  12.             \'products\' => $products,
  13.             \'add_prod_display\' => Configuration::get(\'PS_ATTRIBUTE_CATEGORY_DISPLAY\'),
  14.             \'homeSize\' => Image::getSize(ImageType::getFormatedName(\'home\')),
  15.             \'nb_products\' => $nbProducts,
  16.             \'id_category\' => (int)$category->id,
  17.             \'id_category_parent\' => (int)$category->id_parent,
  18.             \'g_teste\' => $_REQUEST,            
  19.         )
  20.     );
  21.        
  22.     return $this->display(__FILE__, \'homefeatured.tpl\' );
  23. }
');