Jump to content

swap positions between first and last name in BO Customer.


Recommended Posts

in this case you have to edit admin customer controller

there is no other way to achieve it (maybe with some js hacks but it's not solution - it's a workaround)

 

open file:

controllers/admin/AdminCustomersController.php

 

you will see there something like: 

(it's a part of code)

...
array(
					'type' => 'radio',
					'label' => $this->l('Title:'),
					'name' => 'id_gender',
					'required' => false,
					'class' => 't',
					'values' => $list_genders
				),
				array(
					'type' => 'text',
					'label' => $this->l('First name:'),
					'name' => 'firstname',
					'size' => 33,
					'required' => true,
					'hint' => $this->l('Forbidden characters:').' 0-9!<>,;?=+()@#"�{}_$%:'
				),
				array(
					'type' => 'text',
					'label' => $this->l('Last name:'),
					'name' => 'lastname',
					'size' => 33,
					'required' => true,
					'hint' => $this->l('Invalid characters:').' 0-9!<>,;?=+()@#"�{}_$%:'
				),
...

and move this code above the code with first name:

v5jKP3g.png

Link to comment
Share on other sites

in this case you have to edit admin customer controller

there is no other way to achieve it (maybe with some js hacks but it's not solution - it's a workaround)

 

open file:

controllers/admin/AdminCustomersController.php

 

you will see there something like: 

(it's a part of code)

...
array(
					'type' => 'radio',
					'label' => $this->l('Title:'),
					'name' => 'id_gender',
					'required' => false,
					'class' => 't',
					'values' => $list_genders
				),
				array(
					'type' => 'text',
					'label' => $this->l('First name:'),
					'name' => 'firstname',
					'size' => 33,
					'required' => true,
					'hint' => $this->l('Forbidden characters:').' 0-9!<>,;?=+()@#"�{}_$%:'
				),
				array(
					'type' => 'text',
					'label' => $this->l('Last name:'),
					'name' => 'lastname',
					'size' => 33,
					'required' => true,
					'hint' => $this->l('Invalid characters:').' 0-9!<>,;?=+()@#"�{}_$%:'
				),
...

and move this code above the code with first name:

v5jKP3g.png

---

Ok vekia,

i've moved the codes but still appears in the order "last name - name"..i cleaning smarty cache and browser and loged again.

post-696344-0-63984300-1381586489_thumb.jpg

Link to comment
Share on other sites

in the same file you've got also this code:
 

	$this->fields_list = array(
			...
			...
			'lastname' => array(
				'title' => $this->l('Last name'),
				'width' => 'auto'
			),
			'firstname' => array(
				'title' => $this->l('First Name'),
				'width' => 'auto'
			),

can you try to switch positions here?

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...