/** * функция рисует на странице информацию о продуктах в категории */ private function createProduct() { //print 4; //var_dump($this->parents); if ($this->actions > 0 && $this->action_val) { $this->parents->dirid .= " and w.warecode in (" . implode(",", $this->action_val) . ") "; } #$this->parents->search if ($this->searches) { $this->parents->dirid .= $this->searches; } if ($this->parents) { #print "ads"; $productes_all = Models\Warez::getWarez($this->region_id, $this->parents, False); $productes_count = 0; $productes_count = count($productes_all); $productes_m = Models\Warez::getWarez($this->region_id, $this->parents, $this->page); //add params $grid = array(); $markid = array(); $this->params = ""; $param_m = $this->displayProductMark(); $param_g = $this->displayProductGroup(); $this->displayProductNode(); if ($this->page) { $this->displayPageNode($productes_count); } if ($productes_m) { foreach ($productes_m as $key => $val) { if (!in_array($val->grid, $grid)) { $grid[] = $val->grid; } if (!in_array($val->mark, $markid)) { $markid[] = $val->mark; } $this->displayProduct($val); } } $this->getProductMarkVal($markid, &$param_m); $this->getProductGroupVal($grid, $param_g); } }