To create a support ticket, start a search

Orders Grid: Adding all products names in one column


We would like to add a column displaying the names of all products in an order.

We will then be able to:

  • use the filters in the grid to filter the products keeping one line per order
  • rapidly export the orders grid with a line including all products of that order

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

What is the field ID?: orderproductsnames

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

Field name: Products
Table: Another table
Type: Just display
Refresh combinations: No

From the Advanced Properties panel on the right handside:

- select the menu SQLSelect and enter:

return ' , (SELECT GROUP_CONCAT(product_name SEPARATOR " ") FROM `'._DB_PREFIX_.'order_detail` od where od.id_order = o.id_order) as orderproductsnames ';

Exit the editing window.

The new field is now present in the list of available fields and you can add it to your Order grids.

Related articles