We would like to add a column displaying the product field 'if out of stock' in the Order interface.
To add the field to the list of available fields for your products grids, click on the in the 'Add a field' panel and enter the following information:
What is the field ID?: out_of_stock
Sc creates the field, you now need to populate the grid with:
Field name: Out of stock
Table: Another table
Type: multiple choices
From the Advanced Properties panel on the right handside:
- select the menu SQL Select and enter:
return ' , sa.out_of_stock as si_hors_stock';
- select the menu Select options and enter:
return array(0 => _l('Deny orders'), 1 => _l('Allow orders'), 2 => _l('Default(Pref)'));
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.