The link above won't work anymore since I deleted the file and moved it to a password protected area. ;) I took lines 2-5 out, but still get the same error:
Code:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/bizplate/public_html/admin/report.php on line 2 |
Try replacing the first line with this (add just php)
Code:
<?php I think it's a PHP setting with your server. We'll work it out... |
Quote:
Anyone else want to chime in if you've seen this error before? I can only find these two links on PHP bugs, but can't really think up a solution: http://bugs.php.net/bug.php?id=5387 http://bugs.php.net/bug.php?id=5448 |
LOL... well that was a step in the right direction. Now I only get the bottom two lines of the error. Thanks for trying to figure it out. Don't kill youself over it though. ;)
|
Try doing a search and replace:
Find "<?" Replace with "<?php" See if that does anything. |
I did some more reading and it may be that 'magic_quotes_gpc' it turned OFF in your PHP settings. Let me know if you need help finding out how to check this.
|
This picks up failed attempts as well, (which in my case really skews the order qty) is there anyway to have it only accept processed orders?
Thanks, Eduardo. |
This can easily be accomplished by adding a few qualifying statements to the SQL query on Line 110 (or thereabouts): Delete the line where it starts with "$sql = "SELECT tblproducts..." and replace it with the following:
Code:
$sql = "SELECT tblproducts.product, tbldetails.productid, SUM(tbldetails.price*tbldetails.amount) AS total, SUM(tbldetails.amount) AS qty_purchased FROM xcart_order_details AS tbldetails, xcart_products AS tblproducts, xcart_orders AS tblorders WHERE tblproducts.productid=tbldetails.productid AND tbldetails.orderid=tblorders.orderid AND tblorders.date >= $start_date AND tblorders.date <= $end_date AND tblorders.status = 'C' OR tblorders.status = 'P' GROUP BY tbldetails.productid ORDER BY $report_type desc"; Notice that I added two statements: Code:
AND tblorders.status = 'C' OR tblorders.status = 'P' This makes sure it only counts orders that are Complete or Processed. I have tested it on my side and it works fine. Let me know if this helps or not. |
I forgot to mention another nice feature of this report. If you noticed, the X-Cart pre-packaged orders reports shows the total gross/paid amounts for the order date range you selected. Unfortunately, it adds shipping costs as well, so you are truly not generating the amount of revenue that x-cart claims you are. This report ONLY takes into account the product prices, not shipping, so you may notice a difference between this report and the reports that x-cart generates (this statement is valid up to version 3.4.14).
Just an FYI. |
Quote:
I am using 3.3.3 and the second sql didnot work. any help idea? |
All times are GMT -8. The time now is 05:28 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.