Jump to content

Add a new field at "my account" exactly like "addresses"


jubissi

Recommended Posts

I want create another customer fields on "my account", exactly like are the addresses.

I need that customers can add multiples times a group of fields, and delete or edit them.

 

I don't want use it on another place, it is just for information. Need stay on panel for customer and panel for admin. Not need another funcionality.

 

I tried copy the address and addresses files, and database tables. All is works perfect, except because the values aren't save on data base.

If i add manually values on db it shows all fields at this new group list on my-account. When try add or edit by site, this values stay on text boxes but redirection don't works, and neither shows any error. Just stays with values at the same page after click save  and loading page finish.

 

I think .tlp files are right.

About php files and db I'm not sure. 

I listed down what I copied and replaced all words "address" and "addresses" to my new respective names.

 

address.tpl

addresses.tpl

AddressController.php

AddressesController.php

Address.php

AddressFormat.php

db > ps_address

db > ps_address_format

 

And down, i copied on the same file addresses values with respectives new name.

customer.php

 

I think maybe has a place on db that i need add some new information, or an .php file.

 

Please someone can help me? What I forgot?

Anyone know how do this, by this way or by another way?

 

I hope someone help me, i'm turn me crazy!

 

Thanks guys!

Edited by jubissi (see edit history)
Link to comment
Share on other sites

Yes, I kept the same structure.

I called my new field "Disciplina", then what I changed on ObjectModel was just it

 

public static $definition = array(

'table' => 'address',

'primary' => 'id_address',

 

to

 

public static $definition = array(

'table' => 'disciplina',

'primary' => 'id_disciplina',

 

,

 

protected $_includeVars = array('addressType' => 'table');

 

to

 

protected $_includeVars = array('disciplinaType' => 'table');

 

and

 

protected $webserviceParameters = array(

'objectsNodeName' => 'addresses',

 

to

 

protected $webserviceParameters = array(

'objectsNodeName' => 'disciplinas',

 

Of course, on table db the respectives fields too.

Link to comment
Share on other sites

  • 2 weeks later...

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