For example, the Order Discount field (orddiscountamount), and the Coupon Discount field (coupon_discount) are not available to export on Orders. Can't tell you how many times when doing tax reports I've wished those were there!
I've finally tracked down how to add them and it turns out to be really easy!
There are only two files that need edits to make it work.
These are the files:
In "admin\includes\exporter\filetypes" find the name of the type of exports you want to add a field to. For Orders, it's the orders.php file.
In "language\en\admin" find the export.filetype.<filetype>.ini file. For orders, this would be export.filetype.orders.ini
To add the Order Discount Field to the available export fields I did the following:
1. Open language\en\admin\export.filetype.orders.ini and add the following line to the bottom (This is the label that will be shown on the export template creation/edit screen for this field)
Code: Select all
ordDiscountAmount = "Order Discount Amt"
Near the end of the function change
Code: Select all
"orderAccountsReceivable" => array()
Code: Select all
"orderAccountsReceivable" => array(),
"ordDiscountAmount" => array("dbfield" => "orddiscountamount", "format" => "number")
Now go to your export templates and edit one. Look at the orders tab. The new field is now available for selection on your export template.
Easy!