Community Add-Ons

Add file to this package
Top » Reports

Daily Product Report
for osCommerce Online Merchant v2.2

This is a Daily Product Report contribution binspired by the the contribution 2619, "Monthly Sales Report", early version.
A customer wanted to get more details with a report showing how many products and which one are sold for a given date.
Using a "Spiffy Calendar", the administrator can select a day/date, and the report will show a table with the following tables:
No. Order Quantity Product Name Product Model Unit Price Product Quantity Total Purchased

Legend:  Download   Report
Expand All / Collapse All
Daily Product Report v0.3 by adidmamah adidmamah 21 Jan 2008  

This is a bugfix of the quantity and the total price problem.
The quantity and the total price are now shown correctly
The report is OK.

To enable this, just replace in stats_daily_products_sales_report.php :

this

$products_query_raw = "select ot.value, sum(ot.value) as dailyvalue, count(distinct o.orders_id) as howmany_orders, o.orders_id, count(distinct op.orders_products_id) as howmany_tickets, op.products_name, op.products_model, op.final_price as ticket_price, op.final_price * count(distinct op.orders_products_id) as howmuch from orders_total ot, orders o, orders_products op where o.date_purchased like "$date%" and o.orders_id = op.orders_id and ot.orders_id = op.orders_id and ot.class='ot_total' group by op.products_name";

with

$products_query_raw = "select ot.value, sum(ot.value) as dailyvalue, count(distinct o.orders_id) as howmany_orders, o.orders_id, sum(op.products_quantity) as howmany_tickets, op.products_name, op.products_model, op.final_price as ticket_price, op.final_price * sum(op.products_quantity) as howmuch from orders_total ot, orders o, orders_products op where o.date_purchased like "$date%" and o.orders_id = op.orders_id and ot.orders_id = op.orders_id and ot.class='ot_total' group by op.products_name";

Hope this helps :)

Daily Product Report v0.2 by azer azer 15 Feb 2007  
forum support thread azer 15 Feb 2007  
Daily Product Report v0.1 Denise 12 May 2005  
Daily Product Report Marc Sauton 4 Jan 2005