To create a support ticket, start a search

Products Grid: Adding a field added to ps_product table by the installation of a 3rd party module


- Store Commander version 2014-03-12
- SC Grids Editor Pro Add-on - version 1.0
- The field needs to exist in your database (normally created during the module's installation)



We would like to add the field 'Logistician' of the 'Logisticians management module' allowing the selection of logistician in the products grid.

We will then be able to:

- use the filters in the grids to optimize the selection of products
- mass-edit this field using Store Commander's copy/paste option 
- rapidly export the products grid with this field



To add the field to the list of available fields for your products grids, click on the add.png in the 'Add a field' panel and enter the following information:

What is the field ID?: id_logistician (should be exactly the name as it is in the database).


SC creates the field, you now need to populate the grid with:

Field name: Logistician 

Table: product

Refresh combinations: keep 'no'

Type: Multiple choice


To display the choice of logisticians, go to the advanced properties panel:

List of choice:

$sql = 'SELECT id_logistician,name_logistician FROM ps_logistician ORDER BY name_logistician';

$res = Db::getInstance()->ExecuteS($sql);
$tmp = array(0 => 'NA');
foreach ($res AS $row) {
    $tmp[$row['id_logistician']] = $row['name_logistician'];
return $tmp;



This code needs to be modified according to your needs.


Exit the editing window and add the field to your grids.