Esempio n. 1
0
 public function actionIndex()
 {
     $showProducts = FL::fileGetContents('product_count_main_page.txt');
     if (!$showProducts) {
         $showProducts = 6;
     }
     $categories = CategoryModel::getAllUsingColumns();
     $products = ProductModel::getAllUsingColumns(true, $showProducts);
     $recommended = ProductModel::getAllByColumn('is_recommended', '1');
     $view = new View();
     $view->categories = $categories;
     $view->products = $products;
     $view->recommended = $recommended;
     $view->display('site/index.php');
     return true;
 }