Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Admin Sales Totals

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 01-26-2013, 05:59 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Admin Sales Totals

I was looking at some thing and using the existing formulas in the main.php will only get my the previous 365 days. I want, for example from Jan 1, 2012 to Dec 31, 2012. But the existing query in the main.php and the $start_date formulas only account for a start date and do not set a range or end date. Or rather the formula does set the range, but it sets it as the $curtime.

Existing formula:
Code:
$date_condition = "AND $sql_tbl[orders].date>='$start_date' AND $sql_tbl[orders].date<='$curtime'";

Any help?
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #12  
Old 01-28-2013, 11:40 AM
  Johnwiggity's Avatar 
Johnwiggity Johnwiggity is offline
 

Advanced Member
  
Join Date: Nov 2012
Posts: 48
 

Default Re: Admin Sales Totals

I never got it to work the way I wanted to.
__________________
4.5.4

http://www.learningguitarnow.com
Reply With Quote
  #13  
Old 01-28-2013, 12:22 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Admin Sales Totals

I found another thread where a guy figured out how to do yesterday, last 7 and last 30. I'm not in the office eight now, but I'll look when I get back.

I think the best way is to have 2 types formulas working for to desperate sections. Unless I can figure out how to make the php set the end time through the code.
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #14  
Old 01-28-2013, 05:38 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Admin Sales Totals

John,

I found the thread: http://forum.x-cart.com/showthread.php?t=49889

He talks about changing/adding this code to the main.php
Code:
$start_dates[] = mktime() - 24*3600 $start_dates[] = mktime() - 7*24*3600 $start_dates[] = mktime() - 30*24*3600

__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:32 PM.

   

 
X-Cart forums © 2001-2020