在prestashop后台显示数据库中的新字段

I've added to table 'ps_customers' new field called 'how_did_you_know'. Also I've made this field to display when user register his account. Everything goes fine, this value adds to database.

The problem is that I wan't to display it now in back office in place marked on screen or somewhere else but on this page. https://www.dropbox.com/s/pp757pqwaavyz1k/Zrzut%20ekranu%202014-12-10%2019.44.59.png?dl=0

I was trying to add this in place where now is clients name, surname and his ID. In view.tpl this fields are displayed thanks to this: {$customer->firstname} {$customer->lastname}

So I've tried to do the same with my field: {$customer->how_did_you_know}

But unfortunately it didn't worked. All other fields from this table can be displayed this way, but not mine. So I've thought that I should declare this field somewhere, but where I have to do it?

Thank you in advance for your time!

You have to override your Customer class constructor

For instance:

public function __construct($id = null) {
  Customer::$definition['fields']['how_did_you_know'] = array('type' => self::TYPE_STRING);
  parent::__construct($id);
}

Refer to classes/Customer.php and find the $definition array to get examples of field configuration.

Go to your template file too: adminXXX/themes/youradmintheme/template/customers/ and edit the appropriate files.

Good luck ;-)