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-Cart StoreFront Customer Forum

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

 All Forums
 VPCart Forum
 Reporting Feature Price Total
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

5 Posts

Posted - September 23 2004 :  08:14:23  Show Profile  Reply with Quote
Hi, I'm wondering if anyone can help me solve a small issue. We'd like to run a report of the total cost of the customer selected features in a given time frame. In other words, the summary reports display the total sales, total tax, and total shipping for whatever period we enter; but what we also need is basically a way to run a query and find the "total features cost" from the same time period. I need to find a way to separate out the feature prices from the total sales so we can track those separately. We are not after a complicated report split out by total cost of the individual features added, we are just after the aggregate of the cost of all features.

I've noticed that the feature cost seems to be included in an array of information which appears as a chunk of information in various places such as the cart. Can someone help steer me in the right direction as to where/when in the order process I might be able to have the feature costs of each order written to a field separately somewhere in the database (orders or oitems table I am assuming), so I can then report on a sum of that field from records that are searched based on date?

Thanks, any help on this one would be greatly appreciated.


4284 Posts

Posted - September 23 2004 :  14:17:33  Show Profile  Visit support's Homepage  Reply with Quote
Features are stored in the oitems table as a list like

These are the featureids with the prodfeatures table.

You would parse the string
Read the prodfeatures table to get the feature cost for each feature

VP-ASP Support

Go to Top of Page

Starting Member

5 Posts

Posted - September 24 2004 :  12:28:58  Show Profile  Reply with Quote
Thanks for responding. And thanks for the direction. Can you tell me if there is a file in the store that perfoms a similar process? I'm a bit of a novice to ASP, but I'm learning. If I can see something similar in action, I'll be able to work out the solution. Thanks again.

Go to Top of Page

Senior Member

United Kingdom
1898 Posts

Posted - September 24 2004 :  13:57:33  Show Profile  Visit devshb's Homepage  Reply with Quote
I don't know if this'll help, but in case it does here's something that'll bring back a list of the feature descriptions/settings for a given oitem.features value that we created for one of our addons once.....

(oitems.features [the argument to the function] being the value of the chosen features separated by commas as per support's posting above).....

Function BYZGetFeaturesText(arg_featurecodes)
Dim retval
Dim i
Dim tconn
Dim tCursorFeatures
Dim tsqlqrytxtFeatures
Dim tcaption
Dim tname

if (arg_featurecodes="" or IsNull(arg_featurecodes)=true) then
EditOpenDatabase tconn, database,"prodfeatures"
tsqlqrytxtFeatures="SELECT * FROM prodfeatures WHERE id in (" & arg_featurecodes & ")"
Set tCursorFeatures=Server.CreateObject("ADODB.Recordset")
Set tCursorFeatures=tconn.Execute(tsqlqrytxtFeatures)
While Not tCursorFeatures.EOF
if (i>0) then
retval=retval&", "
end if
Set tCursorFeatures=Nothing
' Close the relevant database:
shopclosedatabase tconn
end if
End Function


your feature costs/prices will change over time, so to report accurately historically you'd need to add the feature costs amount to the order/oitems as new columns and populate them when the order gets created as I don't think that value is stamped onto the order/oitems.

Simon Barnaby
[email protected]
Web Design, Online Marketing and VPASP addons

Edited by - devshb on September 24 2004 15:47:15
Go to Top of Page

Starting Member

5 Posts

Posted - September 28 2004 :  07:04:45  Show Profile  Reply with Quote
Thanks Simon! I'm going to give that a try, I think that will do what we need for now. Much appreciated. I'll let you know how it goes.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000