radhouanee Posted October 10, 2019 Share Posted October 10, 2019 Hello guys, please where can i find the fil of customer form ? i need to remove birthdate and other fields from the form please help me Have a good day ^^ Link to comment Share on other sites More sharing options...
EvaF Posted October 11, 2019 Share Posted October 11, 2019 if you want to remove required fields, you have to override classes/Customers.php and controllers/AdminCustomersController.php files (mainly renderForm function) by the analogic way as is described in http:// http://nemops.com/new-customer-address-fields-prestashop/ if you want to remove only optional fields, you can simply hide them in the form: in your module yourModuleName.php: into install() function add line: if !$this->registerHook('displayAdminCustomersForm') return false; and add function public function hookdisplayAdminCustomersForm($params) { return $this->display(__FILE__, 'views/templates/admin/admincustomersform.tpl'); } and create views/templates/admin/admincustomersform.tpl file <script type="text/javascript"> window.addEventListener("load", function(evt) { // hide "Birthday" $("select[name='days']").parent().parent().parent().parent().css('display','none'); // hide "Partner offers" $("input[name='optin']").parent().parent().parent().css('display','none'); }) </script> that's all 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