I am not strong in PHP - so make this edit at your own risk - *BACKUP FIRST* !!

This is my first addition to a contrib. - there is no file to download - but it forces me to put something so I put in vs 2.2.0.

I needed to see the Model Number as well as the Product Name - so in admin/classes/sales_report2.php find this Query:

$this->queryItemCnt = "SELECT op.products_id as pid, op.orders_products_id, op.products_name as pname, sum(op.products_quantity) as pquant, sum(op.final_price * op.products_quantity) as psum, op.products_tax as ptax FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op WHERE o.orders_id = op.orders_id";

Add op.products_model as pm, like this:

$this->queryItemCnt = "SELECT op.products_id as pid, op.products_model as pm, op.orders_products_id, op.products_name as pname, sum(op.products_quantity) as pquant, sum(op.final_price * op.products_quantity) as psum, op.products_tax as ptax FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op WHERE o.orders_id = op.orders_id";

Then - in admin/sales_report/template_default.php look for lines of code like this:



I had two of those in my file. I replaced them with this:



(notice the echo of the 'pm')

This resulted in my report showing me the model numbers just before the product name. I have not looked at the CSV template yet - but at least this is functioning for me online. I hope it helps someone else as well :)

More...