|
|
 |
Re: FN-FORUM html form problem
date posted 17th January 2001 13:54
it sounds to me that youre making a meal of something fairly simple - a
basic asp shopping cart can be knocked out in a couple of hours by doing
this:
you products page generated from database, 2 fields needed - id field and
number_of_items field
each product should be encased within its own form as so:
while not rs.eof
response.write("")
response.write(""
response.write("")
wend
then you create a session based on those values when submitted:
when they wish to go to the checkout/viewbasket you loop through the session
collection and create a sql string to generate a table to get the subtotals
and total
for each thing in session.contents
sql="SELECT * FROM PRODUCTS WHERE productID="&thing
set rs=conn.execute(sql)
subtot=rs("cost")*session(thing)
total=total+subtot
response.write(""&rs(item)&""&rs("cost")&""&sessio
n(thing)&""&formatcurrency(subtot,2)&"remove")
set rs=nothing
next
from this you also create a hidden field containg the total, then when the
page is submitted you loop through he session collection again to create an
order email:
for each thing in session.contents
sql="SELECT * FROM PRODUCTS WHERE productID="&thing
set rs=conn.execute(sql)
subtot=rs("cost")*session(thing)
total=total+subtot
message=..............'pretty much what you did on the
checkout/viewbasket except not creating something for the user to view
set rs=nothing
next
set mailobj=server.createobject(whatever mailobject your using)
mailobj.server=xxx.xxx.xxx.xxx
mailobj.body=message
etc.....
have a look at http://www.hatsonline.net what i did to see how it works -
its really very simple
David Eckersall
Kinetic North Limited
A member of the Wize Group of companies
Reg Co No 4100142
Reg Office and Business Address
St James House, Wellington Road North
Stockport SK4 2QN
Office Tel - 00 44 161 975 5900
Office Fax - 00 44 161 975 5924
Web - http://www.kineticnorth.com
This communication contains information which is confidential and may also
be privileged. It is for the exclusive use of the intended recipient(s). If
you are not the intended recipient(s) please note that any form of
distribution, copying or use of this communication or the information in it
is strictly prohibited and may be unlawful. If you have received this
communication in error please return it to the sender. Internet e-mails are
not necessarily secure. Kinetic North Limited does not accept responsibility
for changes made to this message after it was sent. Our messages are checked
for viruses but please note that we do not accept liability for any viruses
which may be transmitted in or with this message.
----- Original Message -----
From: [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Wednesday, January 17, 2001 1:10 PM
Subject: Re: FN-FORUM html form problem
> ..but will jmail email cart values (not recordest values) as the cart is
written to a table the same time as the email would submit.
>
> ============================================================
>
> * Free listing for freelancers
> * Free to advertise jobs
> * Free jobs distribution service
> * Free database of 1000 freelancers
>
> Freelancers and Freelance Jobs
> http://www.freelancers.net
>
> To post to the Forum:
> [EMAIL REMOVED]
>
> To unsubscribe please email:
> [EMAIL REMOVED]
>
> If you have difficulties unsubscribing please email:
> [EMAIL REMOVED]
>
> To subscribe to the digest for this list or for further information please
visit:
> http://www.freelancers.net/forum.html
|
 |
|