Jump to content

Edit History

EvaF

EvaF

override AdminCustomersController.php

1) place in in your module yourmodule/override/controllers/admin/AdminCustomersController.php
with this content:

<?php


class AdminCustomersController  extends AdminCustomersControllerCore

{
    public function renderList()
    {
        $this->fields_list = array_merge($this->fields_list, array(
            'groupname' => array(
                'title' => $this->trans('Group', array(), 'Admin.Global'),
                'maxlength' => 30
            )
        )
        );
        $this->_select .= ', (
        SELECT gl.name FROM ' . _DB_PREFIX_ . 'customer_group g JOIN ' . _DB_PREFIX_ . 'group_lang gl on gl.id_group = g.id_group and gl.id_lang= '. (int) $this->context->language->id .
            ' WHERE g.id_customer =  a.id_customer) as groupname ';

        return parent::renderList();
    }


}

2) install (or reinstall) your module

result customer list:

PS4.PNG.1a43f72d9855ba648cb08c8870a7d135.PNG

EvaF

EvaF

override AdminCustomersController.php

1) place in in your module yourmodule/override/contollers/admin/AdminCustomersController.php
with this content:

<?php


class AdminCustomersController  extends AdminCustomersControllerCore

{
    public function renderList()
    {
        $this->fields_list = array_merge($this->fields_list, array(
            'groupname' => array(
                'title' => $this->trans('Group', array(), 'Admin.Global'),
                'maxlength' => 30
            )
        )
        );
        $this->_select .= ', (
        SELECT gl.name FROM ' . _DB_PREFIX_ . 'customer_group g JOIN ' . _DB_PREFIX_ . 'group_lang gl on gl.id_group = g.id_group and gl.id_lang= '. (int) $this->context->language->id .
            ' WHERE g.id_customer =  a.id_customer) as groupname ';

        return parent::renderList();
    }


}

2) install (or reinstall) your module

result customer list:

PS4.PNG.1a43f72d9855ba648cb08c8870a7d135.PNG

×
×
  • Create New...