正如您所知,在 prestashop 控制器中,我们可以从数据库获取信息,并通过 field_set 在表中显示主题
$this->fields_list = array(
'clerkfamily' => array(
'title' => $this->l('family'),
'havingFilter' => true,
'callback' => 'printSender',
),
'useremail' => array(
'title' => $this->l('email'),
'havingFilter' => true,
'callback' => 'printSender',
),
);
所以 clerkfamily 和 userremail 是我的数据库表中的列名称,但在这里我想仅在一列中显示主题我该怎么办?
$this->_select = 'CONCAT(a.`clerkfamily`, \'. \', a.`useremail`) `customField`';
$this->fields_list = array(
'customField' => array(
'title' => $this->l('family'),
'havingFilter' => true,
'callback' => 'printSender',
),
);