Inland Empire .NET User's Group Forums
 Home        Members    Calendar    Who's On

Welcome Guest ( Login | Register )
      



Asp.Net Shopping Cart Persistence DesignExpand / Collapse
Message
Posted 11/12/2007 10:05:09 PMPost #66
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
Hi all,

What methods are people using to manage the Shopping Cart before the Customer actually Checks Out ?
The user can still be anonymous and not register prior to checking out.

1.Use Session
2. Persist to Table with a Key (???)
3. Use Asp.Net Session Persistence in the Web. Config (I haven't used this )


1. My current code is saving the Cart Items in a Dataset with a Header Info Table and a Cart Items Table.
The cart is saved in Session("dsCart")

The cart is cleaned up (removed) when the Order is completed.

Issues: Since this dependent on Session ( my current default Timeout is 20 minutes )
the cart will disappear.

2. If the cart is saved to a Database Table then this could be avoided but now I need to somehow Identify the
Saved Cart by some SessionID / Guid associated with the "anonymous" customer at this point.


3. Anyone doing this for a Shopping Cart ?

Peace, LA Guy


Paul Chu
Posted 11/13/2007 2:07:29 PMPost #74
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
It's been my experience that sites like Amazon do just this.  If you never log in your cart is still available when you check back a few days later.

I would suspect they place a cookie on the user's computer that links them with their session in a database.  When you log it I would think it just simply remaps the user's database session with their actual login account.

For a shopping cart system I would definintely recommend this.  You want to make it as easy as possible for users to buy.  If they have to reload their cart a few days later they may be encouraged to look else where since they have to do the work all over again anyway.

Matt

Matt Penner

Posted 11/13/2007 7:01:57 PMPost #75
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
Hi Matt,

Thanks, I guess the most straight forward way is to save a new Cookie with the Key of the saved Cart.

But if they block Cookies, that is toast.

Are there any other alternatives.

Peace, LA Guy

Paul Chu
Posted 11/14/2007 12:41:27 PMPost #76
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
Hi Paul,

Matt's recommendation is valid. The user has to enable cookies or they don't get the full benefit. It's just way too much work to try and develop for every condition.

James

James Johnson
President, Inland Empire .NET User's Group
www.iedotnetug.org

Posted 11/15/2007 2:47:13 PMPost #78
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
The problem is you are trying to "remember" a user's choices when they return at a later date.

To do this you must track the user somehow.

I only see two ways to do this (there may be others):

  1. Have them log in (you already said you didn't want to require this)
  2. Identify them based on some non-interactive way

The industry strandard to accomplish #2 in a reliable manner is to use Cookies.  The only other methods I can think of would be to store info returned by the browser, such as IP address and such, however, this certainly isn't user specific.  One company may have several hundreds of users all using IE7 and behind one IP address.  I wouldn't want someone else's cart to show up when I log in.  What a mess!

So, if the user isn't willing to accept cookies, or deletes their cookies, then they miss out.  I believe this is also an now an understood industry fact of life.  Plus, I don't know the statistics, but even if only 50% of your users allow cookies, then that's 50% more users who retain their shopping carts than you had before.

Matt

Matt Penner

Posted 1/9/2008 5:19:37 PMPost #104
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
some type of session id you presist to a temporary table and clear the data when they get stale.

asp.net allows you to store information in the querystring as well.

- mike
« Prev Topic | Next Topic »


PermissionsExpand / Collapse

All times are GMT -8:00, Time now is 1:10am

Powered By InstantForum.NET v4.1.3 © 2012
Execution: 0.640. 10 queries. Compression Enabled.