Jump to content

remove field of customer form Back-End


radhouanee

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...