public function cardtovargiftAction($id) { if (empty($id)) { return AddAlertMessage('danger', 'Товара не существует.', '/'); } $cat = new Market($this->context); $cat_item = $cat->getFullTovarGift($id); $sid = $cat_item[0]['id_podcat']; $cat_name = $cat->getCat($sid); $tovar = new Komments($this->context); $this->view->setVar('text', $tovar->addKomm()); //проба $this->view->breadcrumbs = array(array('url' => '/', 'title' => 'Главная'), array('url' => '/market/', 'title' => 'Маркет'), array('url' => '../gift_product/', 'title' => 'Дарю/Меняю'), array('url' => '../gift_product/cat-' . $cat_name['id_p'], 'title' => $cat_name['name_cat']), array('url' => '../gift_product/cat-' . $cat_name['id_p'] . '/cardtovargift-' . $cat_item[0]['id'], 'title' => $cat_item[0]['name_tovar'])); $this->view->setVar('block_cat_comission', $cat->getCategoriesChangeTreeHTML()); $this->view->setVar('block_full_tovar', $cat->getFullTovarGiftHTML($id)); $this->view->generate(); }