Order totals Statistics
1 Attachment(s)
This mod will add a section to your statistics page displaying order totals for the given time period (order status completed).
This is on 4.5.3 and 4.5.4 It modifies: admin>statistics.php file skin>common files>admin>main>statistics.tpl See screenshot. Donations can be made to via paypal to slodoug at sbcglobal.net admin>statistics.php find the date picker code: Code:
$date_cond = " date>='$start_date_off' AND date<='$end_date_off' "; add this below it: Code:
$statistics['ordersnet'] = func_query_first_cell("SELECT sum(subtotal) FROM $sql_tbl[orders] WHERE status='C'AND ($date_cond)"); You can modify your statistics tpl file as you like but here is mine, add this where you want the stats: Code:
<tr> |
Re: Order totals Statistics
Looks great, Can you define sales with multiple order statuses? I need Complete, and Processed to be calculated.
|
Re: Order totals Statistics
Maybe someone else can create a selection drop down for the other statuses, or you can add more sections, just change
WHERE status='C' to the status code you want to show. I only need Completed to show. |
Re: Order totals Statistics
would that be like
WHERE status='C,P,N' to define other statuses? |
Re: Order totals Statistics
no, you can only define one status per query as far as I know. You would need someone to code the selection box which I don't know. Google it a bit and you should be able to make it work. Otherwise, just make a new section.
|
Re: Order totals Statistics
Ok I'll check it out thanks.
|
Re: Order totals Statistics
fyi..
I'm trying to make a new Daily sales page that shows: Date, total # of orders, net sales, shipping, coupons, discounts, GC, Tax, surcharges, and Gross sales. Is there a way to Group the data by day within the date range? |
Re: Order totals Statistics
is there any way to modify this code:
Code:
$date_cond = " date>='$start_date_off' AND date<='$end_date_off' "; to add a "for each day" exception??? I also see orders.php has Single day selection code, wonder if I can modify that for this purpose. I just want it to sum the data per day FOR EACH day in the selected month, and show that date per day, one day per table row. |
Re: Order totals Statistics
Just put below code in phpmyadmin query window & it will display you stats for sales by products. very nice to see which are most sold products in your site.
Code:
SELECT p.productid, p.product, COUNT( od.orderid ) AS sales, credit to above code goes to Jon from webistecm http://www.websitecm.com/x-cart-tutorials/x-cart-code-snippets/determine-x-cart-product-sales-statistics/ |
Re: Order totals Statistics
thanks but thats not what i'm looking for.
|
All times are GMT -8. The time now is 12:36 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.