VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 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-ASP Super User

302 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-ASP 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