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); }
public function __construct($title = '') { parent::__construct($title); $filter['colors'] = Db_Color::getAllWithTrans(); $filter['types'] = Db_Type::getAllObjectsWithTrans(); $filter['brands'] = Db_Brand::getAllWithTrans(); $products = Db_Product::filterProducts(); $categories = Db_Category::getAllObjectsWithTrans(); $this->TPL->assign('categories', $categories); $this->TPL->assign('filter', $filter); $this->TPL->assign('products', $products); }
public function __construct($title = '') { parent::__construct($title); if (empty($this->SPage)) { redirectTo('/'); } if (!Db_Product::urlIsValid($this->SPage)) { redirectTo('/'); } $Product = Db_Product::getFullDetails($this->SPage); $this->TPL->assign('Product', $Product); $categories = Db_Category::getAllObjectsWithTrans(); $this->TPL->assign('categories', $categories); $colors = Db_Color::getAllWithTrans(); $this->TPL->assign('colors', $colors); $related = Db_Product::getRandomProducts(); $this->TPL->assign('related', $related); $featured = Db_Product::getRandomProducts(12); $this->TPL->assign('featured', $featured); }
public function Header() { $types = Db_Type::getAllObjectsWithTrans(); $this->TPL->assign('types', $types); $categories = Db_Category::getAllObjectsWithTrans(); $this->TPL->assign('categories', $categories); return $this->TPL->display('header', true, $this->templateDirectory); }