Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Shop Statistics - ( Admin left menu )
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bluesky
VP-CART Super User

304 Posts

Posted - May 14 2008 :  03:27:59  Show Profile  Reply with Quote
Version 6.5 has a nifty little Quick Glance sales Sales to date Calculator in the lef menu ...im sure ya all love it !

Just wondering if anyone has customised it to show different statisitcs , if so what have you done ? and how did ya do it ? ( can ya share the code )


Was thinking the addition of Yesterdays sales total would be useful and an important woul would also be a WEEK to date totl , customisable by date that suits .......in my case Worldpay total sales tues thru to tues and pay on the friday so a at a glance Week to dat starting on a tue would be a useful tool.

Anyways i will likely eventually try n get this as a customisation but just wondering wht everyone else is doing , if anything with the Shop Statistics " box

PAUL

THeVerve
VP-CART New User

117 Posts

Posted - May 16 2008 :  02:14:30  Show Profile  Reply with Quote
You can simply modify the sql query in shopheaders.asp to create your own stats.

For example, create a copy of the sub routine GetTodaysTotal (e.g : GetYesterdayTotal)

Modify this sql query :

sql = "select sum(orderamount) as todayorder from orders WHERE odate = " & datedelimit(datepart("yyyy",date) & "/" & datepart("m",date) & "/" & datepart("d",date))

to something like :

sql = "select sum(orderamount) as todayorder from orders WHERE odate = " & datedelimit(datepart("yyyy",dateadd("d",-1,date)) & "/" & datepart("m",dateadd("d",-1,date)) & "/" & datepart("d",dateadd("d",-1,date)))

The code dateadd("d",-1,date) will return the date for yesterday.

Check this page out for more information on DateAdd function

http://www.w3schools.com/Vbscript/func_dateadd.asp

Hope it helps !
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00