Jump to content

Exporting Custom Sales Reports


toast691

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...