ovy79ro Posted September 14, 2017 Share Posted September 14, 2017 Hi, I use helper class to display product category tree in back office but i want to automatically select child category when parent category is selectet. The code that i use is: array( 'type' => 'categories', 'label' => $this->l('Product Category'), 'name' => 'category', 'required' => true, 'tree' => array( 'id' => 'category', 'selected_categories' => array((int)Configuration::get('category')), 'use_checkbox' => true, ) ) Link to comment Share on other sites More sharing options...
ovy79ro Posted September 15, 2017 Author Share Posted September 15, 2017 No one? Link to comment Share on other sites More sharing options...
ovy79ro Posted September 20, 2017 Author Share Posted September 20, 2017 Anyone? Link to comment Share on other sites More sharing options...
ovy79ro Posted September 22, 2017 Author Share Posted September 22, 2017 I try this jquery code: $(document).ready(function() { $("#category").click(function(){ $(".tree-folder-name").find(":input[type=checkbox]").each(function(){ $(this).prop("checked", true); $(this).parent().addClass("tree-selected"); }); }); }); But it is not working. 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