agjjr Posted February 15, 2016 Share Posted February 15, 2016 Hi there. I am developing a AdminController for a module, and I need to add the tree for category filtering. I am using the code $tree = new HelperTreeCategories('associated-categories-tree', $this->l('Filter by category')); $tree->setAttribute('is_category_filter', (bool) $this->id_current_category) ->setInputName('id-category') ->setAttribute('is_category_filter', isset($_GET["id_category"])) ->setAttribute('base_url', preg_replace('#&id_category=[0-9]*#', '', self::$currentIndex) . '&token=' . $this->token); if (isset($_GET["id_category"])) { $tree->setSelectedCategories(array($_GET["id_category"])); } else { $tree->setSelectedCategories(array(1)); } $this->context->smarty->assign( array( "tree_view" => $tree->render() ) ); The tree is generated correctly, with the root category displayed. When the root category is expanded, I see its subcategories. But when these subcategories are expanded, no other categories are displayed. I noticed in the AdminProducts controller that when a category is selected and the tree is expanded, a request is triggered in order to load the subcategories. But this is not happening in my controller. When a category is selected, the tree is expanded, but no ajax requests are performed. Am I missing something for this helper to work properly? Some javascript that may be missing, or maybe some html class that must be used in the tree container div? Link to comment Share on other sites More sharing options...
neogest.com.br Posted February 25, 2016 Share Posted February 25, 2016 Any solution to the problem? Link to comment Share on other sites More sharing options...
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