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

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Setting a cookie time...
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Matt Peterson
Starting Member

7 Posts

Posted - 25 February 2002 :  19:23:19  Show Profile
Hey all,
I have an e-commerce site that was done all asp in storefront and frontpage. It has been turned over to me and I want to add a feature or change a setting.
If you go to our site and put a bunch of stuff in our shopping cart and then leave to go eat dinner or for whatever reason, you come back and the cart is empty. I want the items to stay in there a long time...weeks...months even just like the GAP online store is. My wife had put some products in her cart like 6 months ago and logged onto GAP the other day and they were still there.
Where do I change this time setting and let me know the cons, if any, of doing so.

Thanks

Matt Peterson

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 26 February 2002 :  01:48:39  Show Profile  Visit Gremlin's Homepage
It sounds like your particular shopping cart is using whats known as Session Variables to store the items in it.

A Session Variable only 'stays alive' until either the user closes their browser, the server issues a Session.Abandon command, or the default inactivity timeout is reached (normally 20 minutes I think).

Here is two ways to make the information persist for longer periods.

1) Use a cookie to store the shopping cart contents on the users machine. You can set this to not expire so it remains until such time as the user deletes their cookie cache

2) Write the information to a database. This would be the most ideal solution because the data can remain in the database basically indefinately. To use this however you would need a unique way of identifing the customer - say somthing like a logon user/id password system.

www.daoc-halo.com


Edited by - Gremlin on 26 February 2002 01:49:35
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 27 February 2002 :  02:24:30  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
I wrote a shopping cart and used a session array which is the easyest way of doing something like this because to store the items in the database for users that you do not even have a username or password for is hard, but is something that can be done. i am planning on redoing the shopping cart and thinking about adding this as the way it works.

Brad
Web Hosting with SQL Server @ $24.95 per month
Snitz Mod Archive

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.98 seconds. Powered By: Snitz Forums 2000 Version 3.4.07