Esempio n. 1
0
 public function index()
 {
     $oCategory = new Catalog_Category();
     if (isset($_COOKIE['brandID'])) {
         $this->show->brandID = $_COOKIE['brandID'];
     } else {
         $this->show->brandID = $oCategory->getFirst();
         setcookie('brandID', $this->show->brandID, null, '/');
     }
     $this->show->categoryList = $oCategory->getList($this->show->brandID);
     if (isset($_COOKIE['categoryID'])) {
         $this->show->categoryID = $_COOKIE['categoryID'];
     } else {
         $this->show->categoryID = $oCategory->getFirstC($this->show->brandID);
         setcookie('categoryID', $this->show->categoryID, null, '/');
     }
     $catalog = new Catalog();
     $this->show->itemList = $catalog->getList($this->show->categoryID);
 }
Esempio n. 2
0
 public function brand()
 {
     if (!$this->show->itemID) {
         redirect(BASE_PATH . 'catalog');
     }
     $this->show->item = $this->oCatalogBrand->getById($this->show->itemID);
     $this->show->breadcrumbs[] = array('url' => BASE_PATH . 'catalog/category/' . $this->show->item['CategoryID'], 'title' => $this->show->item['Title']);
     $oCatalog = new Catalog();
     $this->show->itemList = $oCatalog->getList(0, $this->show->itemID);
 }