Jump to content

Add group in customers list in Backend, in version Prestashop 1.7

Recommended Posts


What files in default backened theme I have to modify to show the group which a customer belong to in customers list in backend?

I found a solution for version 1.6 but not for 1.7
Otherwise this is quite an important parameter so I wonder that the list is missing.


Share this post

Link to post
Share on other sites

override AdminCustomersController.php

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


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:


Edited by EvaF (see edit history)

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More