azer Posted February 15, 2007 Share Posted February 15, 2007 here is the support thread for this report contribution http://www.oscommerce.com/community/contributions,2791 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 Quote MS2 Link to comment Share on other sites More sharing options...
azer Posted February 15, 2007 Author Share Posted February 15, 2007 (edited) Changes : ---------- 0.2 by azer Added CVS export Removed useless point Added a currency format ( no more hardcoded) Change a little bit the layout Added some language define for hard coded terms still remaining to do !!!: - the quantity are not shown correctly - so the sum and the report is FALSE - when you click on a product it doesnt show the customer that have purchased the product Need help ! Edited February 15, 2007 by azer Quote MS2 Link to comment Share on other sites More sharing options...
radders Posted February 15, 2007 Share Posted February 15, 2007 I think adding a way of checking which customers have bought the products would be good. Otherwise this report would seem to be just a specific case of the reports that can be requested with Sales Report 2. Quote Link to comment Share on other sites More sharing options...
thepw Posted March 27, 2007 Share Posted March 27, 2007 Hi there, I am getting the following error ... Fatal error: Call to undefined function: mirror_out() in /home/mickdieg/public_html/admin/stats_daily_products_sales_report.php on line 110 How do I define the mirror_out function? Quote Link to comment Share on other sites More sharing options...
cabl3gu7 Posted December 5, 2007 Share Posted December 5, 2007 Hi there, I am getting the following error ... Fatal error: Call to undefined function: mirror_out() in /home/mickdieg/public_html/admin/stats_daily_products_sales_report.php on line 110 How do I define the mirror_out function? I removed them and it all worked. The other thing is that the csv outputs nothing as the variable $csv_accum never gets updated. I have it set to: $csv_accum.=$csv_date.",".$products['products_model'].",".number_format($products['howmany_tickets'],0).",".number_format($products['ticket_price'],2); But you could have it set to any of the variables held in the previous table: $rows; $date; number_format($products['howmany_orders'],0); $products['products_name']; $products['products_model']; number_format($products['ticket_price'],2); number_format($products['howmany_tickets'],0); number_format($products['howmuch'],2); Quote Link to comment Share on other sites More sharing options...
cabl3gu7 Posted December 5, 2007 Share Posted December 5, 2007 Oh a side line for the author: still remaining to do !!!: - the quantity are not shown correctly I HAVE TESTED THEM AND THEY SEEM TO SHOW CORRECTLY... - so the sum and the report is FALSE MEBE NOT! - when you click on a product it doesnt show the customer that have purchased the product. THIS WOULD BE IMPOSSIBLE AS MANY DIFFERENT PEOPLE CAN BUY A PRODUCT SO THIS LINK IS UNABLE TO BE USED USEFULLY. I have made some additions for discount coupons in this addition. Message me here and i'll post them if anyone needs them. l8rz Quote Link to comment Share on other sites More sharing options...
Nathali Posted February 19, 2008 Share Posted February 19, 2008 Hello !! This contribution is not working ! Could someone help to fix it ?? Regards, Nathali Quote Best Regards, Nathali Link to comment Share on other sites More sharing options...
spencermjax Posted April 28, 2008 Share Posted April 28, 2008 does this contribution all for the viewing of items sold pre customer? Quote Link to comment Share on other sites More sharing options...
PJ2006 Posted June 9, 2008 Share Posted June 9, 2008 Hi there, I am getting the following error ... Fatal error: Call to undefined function: mirror_out() in /home/mickdieg/public_html/admin/stats_daily_products_sales_report.php on line 110 How do I define the mirror_out function? I get this exact same problem can anyone help me? I've taken the latest fix - I get the following error - this is a problem with the format of the date - if I fix this I'm back to the undefined function error Thanks Lotti Quote Link to comment Share on other sites More sharing options...
PJ2006 Posted June 9, 2008 Share Posted June 9, 2008 I get this exact same problem can anyone help me? I've taken the latest fix - I get the following error - this is a problem with the format of the date - if I fix this I'm back to the undefined function error Thanks Lotti Sorry this is the error I get with the fix: Parse error: syntax error, unexpected T_VARIABLE in /home/src/public_html/shop/admin/stats_daily_products_sales_report.php on line 124 Quote Link to comment Share on other sites More sharing options...
PJ2006 Posted June 15, 2008 Share Posted June 15, 2008 Sorry this is the error I get with the fix: Parse error: syntax error, unexpected T_VARIABLE in /home/src/public_html/shop/admin/stats_daily_products_sales_report.php on line 124 Anyone? Quote Link to comment Share on other sites More sharing options...
cabl3gu7 Posted October 15, 2008 Share Posted October 15, 2008 Anyone? You need to swap out the statement for 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"; It was just a matter of escaping the characters around the $date%. On another not the spiffy cal day selector doesn't work in ie's, any ideas?? All the best.... Quote Link to comment Share on other sites More sharing options...
azer Posted November 22, 2008 Author Share Posted November 22, 2008 I have installed Daily Product Report v0.3 by adidmamah still remaining to do !!!:- the quantity are not shown correctly I HAVE TESTED THEM AND THEY SEEM TO SHOW CORRECTLY... - so the sum and the report is FALSE MEBE NOT! - when you click on a product it doesnt show the customer that have purchased the product. THIS WOULD BE IMPOSSIBLE AS MANY DIFFERENT PEOPLE CAN BUY A PRODUCT SO THIS LINK IS UNABLE TO BE USED USEFULLY. still remaining to do !!!: - the quantity are not shown correctly - true for the product quantity so the report total seems false what is strange is that the final total is right ! - when you click on a product it doesnt show the customer that have purchased the product. THIS WOULD BE IMPOSSIBLE AS MANY DIFFERENT PEOPLE CAN BUY A PRODUCT SO THIS LINK IS UNABLE TO BE USED USEFULLY. what is the purpose then to have a link to a blank table page ? i had this code to preview the article but doesnt seems to work either : <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='<?php echo tep_href_link(FILENAME_CATEGORIES, 'action=new_product_preview&read=only&pID=' . $products['products_id'] . '?page=' . $HTTP_GET_VARS['page'], 'NONSSL'); ?>'"> nice feature would be to to have a cron job to send this report daily by email Quote MS2 Link to comment Share on other sites More sharing options...
azer Posted November 22, 2008 Author Share Posted November 22, 2008 one other difference in the new contrib i dont understand if it s a mistake or the effect is the missing : document. on document.dailyreportform.reportdate.value old version : <script language="javascript">cal1.writeControl(); cal1.dateFormat="yyyy-MM-dd"; document.dailyreportform.reportdate.value="<?php echo $date; ?>"</script></td> new version <script language="javascript">cal1.writeControl(); cal1.dateFormat="yyyy-MM-dd"; dailyreportform.reportdate.value="<?php echo $date; ?>"</script></td> Quote MS2 Link to comment Share on other sites More sharing options...
Zane86 Posted April 13, 2010 Share Posted April 13, 2010 Is it possible to add Manufacturer for each product in the report? Quote Link to comment Share on other sites More sharing options...
Grant7 Posted August 24, 2010 Share Posted August 24, 2010 I have this contribution working well with the date range, except the page links at the bottom of the page have never worked, so the total number of products do not show. Here's what I have at the bottom of my page: "Displaying 1 to 1 (of 1 products) Page 1 of 1" And here is the code I have to display this: <td class="smallText" valign="top"><?php echo $customers_split->display_count($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo $customers_split->display_links($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], "date1={$_REQUEST['date1']}&date2={$_REQUEST['date2']}"); ?> </td> Any help would be greatly appreciated. Thanks, Grant Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.