Sales Report 2
for osCommerce Online Merchant v2.2
Soon there will be available a new Sales report. sales_report/stats_sales_report2.php.
This is a live shop!
So please not to much traffic, otherwise i have to stop the preview.
Limitations for demo:
- max top 10
- all money fields are set 0.00
- dates can be selected from Dec 1., 2002 to now
Have fun
Charly
Right now you can download only a screenshot :(
Details for download comming soon (in a week or so)
Legend: 
Download

Report
This is a standalone French translation file, taken from the english version of release 2.1
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:
<td class="dataTableContent" align="left"><a href="<?php echo tep_catalog_href_link("product_info.php?products_id=" . $info[$i]['pid']) ?>" target="_blank"><?php echo $info[$i]['pname']; ?></a>
I had two of those in my file. I replaced them with this:
<td class="dataTableContent" align="left"><?php echo $info[$i]['pm']; ?> <a href="<?php echo tep_catalog_href_link("product_info.php?products_id=" . $info[$i]['pid']) ?>" target="_blank"><?php echo $info[$i]['pname']; ?></a>
(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 :)
This is a mod to the sales report 2 for mvs which creates a dropdown of all vendors in order to call up sales figures per vendor.
Simply overwrite your existing files with ones included.
my apologies for posting this request here. this is a great contrib and i think all those who have made it available.
i need however to have the ability to select the manufacturer so it only lists products by that manufacturer. anyone know how to accomplish this?
thanks in advance....
Detail quantities for atrributes was just counting orders and not factoring in quantities of each attribute. So that detail quantities sometimes did not match total product quantities.
Just changed
""SELECT count(op.products_id) as attr_cnt"
to
"SELECT sum(op.products_id) as attr_cnt"
This is a fix for those of us with non standard table names.
The only change made is on line 31 to use the defined table names from database_tables.php as below:
$statusQuery = tep_db_query("select * from " . TABLE_ORDERS_STATUS);
same as below updated file - just zipped with the correct directory structure and file placement... sorry.
catalog/admin/includes/sales_report/template_default.php
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
Only 1 modded file included
Added possibility to compare with previous day, month or year
moved all CONSTANTS to an own namespace (SR_*)
The same file with french file.
Sales Report Version 2.1
by Chemo aka Charly Wilhelm
History:
U6 (2005/February/17) Version 2.1
- Instructions Updated
- Screenshot Provided
Screenshot Provided is self-explanitory of what this contribution does.
Update only needed if you use more than 1 attribute per item. these are showed now correctly.
corrected products options (works now properly)
requested by Matt C.
Updated 2 lines for displaying the months in the selection correctly.
includes the products attributes
I thought this wouldn't happen to me ...
I forgot to replace "1234" by "$info[0]['shipping']" in the export ...
here again the complete set of files
Shipping Costs added
requested by some users.
All files have been changed.
Here we go ...
have fun
sponsored by Derrick (d-woo)
implemented by me
Soon there will be available a new Sales report. You can see a preview version on https://pc4all.dynu.com/sales_report/stats_sales_report2.php.
This is a live shop!
So please not to much traffic, otherwise i have to stop the preview.
Limitations for demo:
- max top 10
- all money fields are set 0.00
- dates can be selected from Dec 1., 2002 to now
Have fun
Charly
Right now you can download only a screenshot :(
Details for download comming soon (in a week or so)