Forum Moderators: open

Message Too Old, No Replies

Shopping Cart: New technique wanted

Storing a list of products in the cart for the user.

         

HyperGeek

5:42 pm on Apr 21, 2003 (gmt 0)

10+ Year Member




Currently, when a user adds an item to their cart it takes a checksum created for their current session, and adds a temp record in the table such as:

USERID: 001 ¦ PRODUCTID: 10 ¦ QUANTITY: 2

When the user checks out, the records with that checksum ID are then deleted after the transaction takes place.

I would rather handle the above function with client-side cookies. Now, it's easy to do this:

Response.Cookies("Product_10")("Quantity") = 2

...but I want to avoid looping through all of the product ID #'s just to find the ones that have a "quantity" value.

Any suggestions?

RossWal

11:06 pm on Apr 21, 2003 (gmt 0)

10+ Year Member



You can loop through the collection of cookies instead. Or use one cookie for carted products and use semicolons or something to delimit to the contents in the single cookie.

Ross

markusf

12:19 am on Apr 22, 2003 (gmt 0)

10+ Year Member



over 10% of people have client side cookies turned off.. Its a real pain in the ass :( Unless you have really good tracking system you won't even notice how many customers your losing...

Scampi

10:01 am on Apr 28, 2003 (gmt 0)

10+ Year Member



Yea, I know I try to avoid using cookies, simply because of the number of people without them. Programs such as Zone Alarm and other personal firewalls often advise people to turn off cookies, I know mine did when I installed it (ive got them working again now tho :)