To create a support ticket, start a search

Orders Grid: adding 'Manufacturer' field

Prerequisites:

- Store Commander version 2014-03-12
- SC Grids Editor Pro Add-on - version 1.0

 

Target:

We would like to add a column displaying the Manufacturer associated to products within orders.

We will then be able to:

- use the filters in the grid to filter products by manufacturer keeping one line per order
- rapidly export the orders grid with a line including all products associated to a specific manufacturer of that order
 

Setup:

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?: manufacturer_name

 

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

Field name: Manufacturer

Table: non

Type: only display

 

  • From the Advanced Properties panel:
     

 SQLSelectDataSelect

return ' ,manu.name AS manufacturer_name';


SQLLeft join

return " LEFT JOIN "._DB_PREFIX_."manufacturer manu ON (manu .id_manufacturer = p.id_manufacturer)";

 

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