Exemple #1
0
 public function __construct($title = '')
 {
     parent::__construct($title);
     $categories = Db_Category::getAllObjectsWithTrans();
     $products = array();
     $products['new'] = Db_Product::getProducts('new');
     $products['sale'] = Db_Product::getProducts('sale');
     $products['featured'] = Db_Product::getProducts('featured');
     $products['hot_deals'][] = Db_Product::getProducts('hot_deals', 1);
     $products['hot_deals'][] = Db_Product::getProducts('hot_deals', 4);
     $products['hot_deals'][] = Db_Product::getProducts('hot_deals', 7);
     $products['apple'] = Db_Product::getProductsByBrandId(8, 3);
     $products['gamers'] = Db_Product::getProductsByCategoryId(5, 3);
     $products['style'] = Db_Product::getProductsByCategoryId(3, 3);
     $products['sport'] = Db_Product::getProductsByCategoryId(2);
     $banners['172X170'] = Db_Banners::getBannerBySize('172X170', 1);
     $banners['180X170'] = Db_Banners::getBannerBySize('180X170', 1);
     $banners['270X337'] = Db_Banners::getBannerBySize('270X337', 3);
     $banners['270X320'] = Db_Banners::getBannerBySize('270X320', 1);
     $banners['470X158'] = Db_Banners::getBannerBySize('470X158', 1);
     $banners['370X158'] = Db_Banners::getBannerBySize('370X158', 1);
     $banners['870X160'] = Db_Banners::getBannerBySize('870X160', 1);
     $slider = Db_Slider::getForFrontend();
     $this->TPL->assign('banners', $banners);
     $this->TPL->assign('categories', $categories);
     $this->TPL->assign('slider', $slider);
     $this->TPL->assign('products', $products);
 }
 private function CheckIdExist()
 {
     if (!Db_Slider::checkExists($this->Id, 'id')) {
         $this->Msg->SetMsg($this->_T('error_id_not_exist') . ' ' . $this->Id);
         $this->Msg->SetError(true);
         $this->Redirect($this->PageUrl);
     }
 }