To create a support ticket, start a search

Orders Grid: adding 'Order VAT' field


We would like to add a column displaying the tax rule applied on the orders


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: Order VAT
Table: order_details
Type: only display

From the Advanced Properties panel on the right handside:

- select the menu SQL Select and enter:

return ', as tax_name';

- select the menu SQL Left Join and enter:

return 'LEFT JOIN ps_order_detail_tax odt ON (od.id_order_detail = odt.id_order_detail)
        LEFT JOIN ps_tax_lang taxl ON (odt.id_tax = taxl.id_tax )';

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