For Programmers: Free Programming Magazines  


Home > Archive > ASP > July 2004 > cart cookies









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cart cookies
shank

2004-07-26, 3:55 pm

I need to build my own simple cart that writes to cookies only. I can write
and read cookies, but don't have a clue as to how I can add multiple
products, change quantites, etc. All I need is a cart that stores
information in cookies and the user prints their order. That's it. Where can
I find such information?

thanks


Aaron [SQL Server MVP]

2004-07-26, 3:55 pm

A cookie is just a text file. There are no columns, and there is no such
concept as "change the quantity"... if you change the data, you re-write the
cookie...

--
http://www.aspfaq.com/
(Reverse address to reply.)




"shank" <shank@tampabay.rr.com> wrote in message
news:eGLBKUzcEHA.3476@tk2msftngp13.phx.gbl...
> I need to build my own simple cart that writes to cookies only. I can

write
> and read cookies, but don't have a clue as to how I can add multiple
> products, change quantites, etc. All I need is a cart that stores
> information in cookies and the user prints their order. That's it. Where

can
> I find such information?
>
> thanks
>
>



shank

2004-07-26, 8:55 pm

How about a tutorial on writing rows of data to cookies?
I understand writing one set of values, but a cart cookie would hold many
sets of values.
thanks

"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:OSMmX2zcEHA.1124@TK2MSFTNGP11.phx.gbl...
> A cookie is just a text file. There are no columns, and there is no such
> concept as "change the quantity"... if you change the data, you re-write

the
> cookie...
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
>
>
> "shank" <shank@tampabay.rr.com> wrote in message
> news:eGLBKUzcEHA.3476@tk2msftngp13.phx.gbl...
> write
> can
>
>



Aaron [SQL Server MVP]

2004-07-26, 8:55 pm

> I understand writing one set of values, but a cart cookie would hold many
> sets of values.


What, you mean like

Response.Cookies("row1") =
" Q=5,pID=sku67282,description=bra,price=1
5.99,size=36D"
Response.Cookies("row2") =
" Q=1,pID=sku67283,description=boxers,pric
e=12.99,size=XL"
Response.Cookies("row3") =
" Q=2,pID=sku67284,description=teddy,price
=44.99,size=4"

?

I don't know what kind of tutorial you're looking for. I also don't know
why you would want a cookie-only shopping cart. What advantage does this
give you over existing methods, for which source code is readily available?

--
http://www.aspfaq.com/
(Reverse address to reply.)


shank

2004-07-26, 8:55 pm

I'm trying to get a fully functional website onto a CD. Along with that I
would like to add a simple cart where a user can add products and print out
their order. Hence, the need for cookies. I cannot send them to the internet
or write to a database. Doing that would be to friggin' easy...
thanks

"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:uxJ1uu0cEHA.3476@tk2msftngp13.phx.gbl...
many[color=darkred]
>
> What, you mean like
>
> Response.Cookies("row1") =
> " Q=5,pID=sku67282,description=bra,price=1
5.99,size=36D"
> Response.Cookies("row2") =
> " Q=1,pID=sku67283,description=boxers,pric
e=12.99,size=XL"
> Response.Cookies("row3") =
> " Q=2,pID=sku67284,description=teddy,price
=44.99,size=4"
>
> ?
>
> I don't know what kind of tutorial you're looking for. I also don't know
> why you would want a cookie-only shopping cart. What advantage does this
> give you over existing methods, for which source code is readily

available?
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>



Aaron [SQL Server MVP]

2004-07-26, 8:55 pm

How do you plan on running ASP code from a CD? Do you expect end users to
be able to install / configure IIS, and make a virtual directory pointing to
their CD-Rom?

--
http://www.aspfaq.com/
(Reverse address to reply.)






"shank" <shank@tampabay.rr.com> wrote in message
news:uTVbp20cEHA.2812@tk2msftngp13.phx.gbl...
> I'm trying to get a fully functional website onto a CD. Along with that I
> would like to add a simple cart where a user can add products and print

out
> their order. Hence, the need for cookies. I cannot send them to the

internet
> or write to a database. Doing that would be to friggin' easy...



shank

2004-07-26, 8:55 pm

ActiveSite Compiler will do it. I've tried it and it works. The downside is
that it must use ASP and one other language like vbscript.

"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:uyqR970cEHA.3128@TK2MSFTNGP11.phx.gbl...
> How do you plan on running ASP code from a CD? Do you expect end users to
> be able to install / configure IIS, and make a virtual directory pointing

to
> their CD-Rom?
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
>
>
>
>
> "shank" <shank@tampabay.rr.com> wrote in message
> news:uTVbp20cEHA.2812@tk2msftngp13.phx.gbl...
I[color=darkred]
> out
> internet
>
>



Jeff Cochran

2004-07-27, 8:55 am

On Mon, 26 Jul 2004 20:45:48 GMT, "shank" <shank@tampabay.rr.com>
wrote:

>ActiveSite Compiler will do it. I've tried it and it works. The downside is
>that it must use ASP and one other language like vbscript.


ASP isn't a language. VBScript (or Jscript) is the language used in
ASP.

Which brings up your assertion that you can't use a database. Which
you can, you just can't write to it. Which means you can have saved
queries though, and just store the query variables in the cookie, item
number and quantity for example. The description, price, etc. are all
retrievable.

Or write to a local file, running off CD you can still write to the C:
drive. Or stop trying to do this in ASP and do a VB front end, like
normal programmers. :)

Jeff


>
>"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
>news:uyqR970cEHA.3128@TK2MSFTNGP11.phx.gbl...
>to
>I
>


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com