To create a support ticket, start a search

Orders Grid: adding 'Product VAT' field


We would like to add a column displaying the tax rule associated to products 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?: tax_name

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

Field name: Product VAT
Table: order_details
Type: only display

From the Advanced Properties panel on the right handside:

- select the menu SQL Select and enter:

return ', IF(od.tax_name != "", od.tax_name, as tax_name';

- select the menu SQL Left Join and enter:

return 'LEFT JOIN '._DB_PREFIX_.'tax_rules_group trg ON p.id_tax_rules_group= trg.id_tax_rules_group';

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