crimba Posted July 16, 2019 Share Posted July 16, 2019 Hi i try to add custom checkbox to category. I Attach the checkbox. I add the checkbox follow this guide: https://stackoverflow.com/questions/30735704/prestashop-1-6-add-custom-field-to-category but i the checkbox don't save. Link to comment Share on other sites More sharing options...
crimba Posted July 16, 2019 Author Share Posted July 16, 2019 This is my class: class AdminCategoriesController extends AdminCategoriesControllerCore{ public function renderForm() { $countries = Country::getCountries(Context::getContext()->language->id); $checkboxcountries = array(); foreach ($countries as $key => $value){ $checkboxcountries[] = array( 'check_id' => $value['iso_code'], 'name' => $value['name'], 'val' => $value['iso_code'] ); } $this->fields_form_override =array( array( 'type' => 'checkbox', 'label' => $this->l('Restricted Countries'), 'name' => 'hide_in_countries', 'values' => array( 'query' => $lesChoix = $checkboxcountries, 'id' => 'check_id', 'name' => 'name', 'desc' => $this->l('Please select') ), ), ); return parent::renderForm(); } } 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