soduno Posted May 23, 2016 Share Posted May 23, 2016 (edited) I am creating a custom field in the categories backend. The custom field is showing correctly (no problems there), but I cannot save any data to it. I am using a override. Do I have to do any other creations than just adding a new array specifying the input that gonna be added like following (to renderForm) in adminCategoryController.php: array( 'type' => 'text', 'name' => 'myCustomField', 'label' => $this->l('custom label'), 'required' => false, 'hint' => $this->l('custom descr'), ), I have seen some examples where modifications to the database is needed, but is that required? Normally, speaking of plugins, you dont need to do any database modifications to that custom field in a plugin. :-) Edit: Ended up creating a module for this instead, since overriding isn't the smartest idea. Edited May 26, 2016 by soduno (see edit history) Link to comment Share on other sites More sharing options...
soduno Posted May 23, 2016 Author Share Posted May 23, 2016 Okay. Seems that I needed to specify that field inside override->classes->Category.php and then add it to $definition array :-) 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