Przez przypadek usunolem kategorie glowna. wyskakuje mi teraz komunikat:
Root category must be an integer value at line 212 in file classes/helper/HelperTreeCategories.php
207. }208. 209. public function setRootCategory($value)210. {211. if (!Validate::isInt($value)) {212. throw new PrestaShopException('Root category must be an integer value');213. }214. 215. $this->_root_category = $value;216. return $this;217. }
Question
starfilm
Pomocy! Jak to naprawić?
Przez przypadek usunolem kategorie glowna. wyskakuje mi teraz komunikat:
Root category must be an integer value
at line 212 in file classes/helper/HelperTreeCategories.php
207. }208. 209. public function setRootCategory($value)210. {211. if (!Validate::isInt($value)) {212. throw new PrestaShopException('Root category must be an integer value');213. }214. 215. $this->_root_category = $value;216. return $this;217. }2499. // Generate category selection tree2500. $tree = new HelperTreeCategories('categories-tree', $this->l('Filter by category'));2501. $tree->setAttribute('is_category_filter', (bool)$this->id_current_category)2502. ->setAttribute('base_url', preg_replace('#&id_category=[0-9]*#', '', self::$currentIndex).'&token='.$this->token)2503. ->setInputName('id-category')2504. ->setRootCategory(Category::getRootCategory()->id)2505. ->setSelectedCategories(array((int)$id_category));2506. $this->tpl_list_vars['category_tree'] = $tree->render();2507. 2508. // used to build the new url when changing category2509. $this->tpl_list_vars['base_url'] = preg_replace('#&id_category=[0-9]*#', '', self::$currentIndex).'&token='.$this->token;184. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {185. $this->initHeader();186. }187. 188. if ($this->viewAccess()) {189. $this->initContent();190. } else {191. $this->errors[] = Tools::displayError('Access denied.');192. }193. 194. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {362. if (isset($params_hook_action_dispatcher)) {363. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);364. }365. 366. // Running controller367. $controller->run();368. } catch (PrestaShopException $e) {369. $e->displayMessage();370. }371. }372.Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now