toast691 Posted June 26, 2018 Share Posted June 26, 2018 I am just wondering if it is possible to add items to the sales report so it can exported into a CVS. I am referring to the table in the admin control panel and go to Reports>Sales Reports. Currently the following are items are exported as standard: There are two specific database items I would like to include in in the table which is order weight and ship_product. Any ideas how this could be done? Link to comment Share on other sites More sharing options...
bsmither Posted June 27, 2018 Share Posted June 27, 2018 We can use a Code Snippet hook (which means this hack will survive an upgrade), or we can just hack the code. In the admin file /sources/reports.index.inc.php, near line 80 (depending what version of CubeCart you are using), find: ## Fetch data, and display, and/or provide download $oid_col = $GLOBALS['config']->get('config', 'oid_mode') =='i' ? $GLOBALS['config']->get('config', 'oid_col') : 'cart_order_id'; $fields = array( 'order_date', $oid_col, 'cart_order_id', Some of the above lines of code may not be there. After: 'cart_order_id', add the following: 'weight', 'ship_product', Link to comment Share on other sites More sharing options...
toast691 Posted July 2, 2018 Author Share Posted July 2, 2018 Thanks for that bsmither. I knew it wouldn't be hard just didn't know where to look. I presume this will resort to original coding when updating but thats fine. Adding a code snippet hook is probably beyond me. Cheers Stami Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.