Hi Mark,

Actually this is EXACTLY what I was thinking of doing.
The one problem that I had with this idea is that I was 
a bit worried about filling up the session object with 
lots of stuff. 

Is this not really a problem?

Cheers,
Brian





-----Original Message-----
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: 21 August 2003 16:02
To: Struts Users Mailing List
Subject: Re: [OT] Shopping cart best practices - Cookie, HttpSession or
DB

I haven't any tech input, but I've an idea how I'd stagger the 
development.I'd forget about cookies and db's at first, save them for a 
later stage.

1. Store your cart in session, and when that all works. For everyone. 
Gets to the checkout and funds are exchanged.

2. Create a login where clever stuff like saving your objects to db's 
goes on.

3. Then once you've a logged in user start thinking about when to save 
the cart.

if(user.isLogged()) {
        //or however your api lets you do it
        cart.save();
}

None of what I've said is ground breaking, but It does avoid messing 
with cookies, up to this stage. When the user logs in s/he gets his/her 
cart back.

4. I guess the final stage could be to do the cookie stuff, so users 
are logged in as soon as they get to the site. And thus the retrieval 
of the cart also, as its already in place integration would be smooth.

Don't know who useful this is, but there's nothing to offer in terms of 
the actual mechanisms in play. But by getting folks paying asap, the 
extras don't become show stoppers.

Cheers Mark

On Thursday, August 21, 2003, at 02:33 PM, Brian McSweeney wrote:

> Hi Vic,
>
> Definitely life would be easier, but I don't think it's as good :-)
>
> Thanks though,
> Brian
>
> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Vic Cekvenich
> Sent: 21 August 2003 02:30
> To: [EMAIL PROTECTED]
> Subject: Re: [OT] Shopping cart best practices - Cookie, HttpSession
or
> DB
>
> I think you'd make your life easier if your required login.
> .V
>
> Brian McSweeney wrote:
>
>> Hi all,
>>
>> Quick question. I want to implement a shopping cart. I know this has
>> been done a million times in a million open source projects however I
>> have a few questions, and seeing as everyone in here seems so
>> knowledgeable.
>>
>> What I'd like:
>>
>> 1) User can add to shopping cart without having to check in.
(checkout
>> requires login).
>>
>> 2) User can leave the site and un-checked out shopping cart data will
>> remain.
>>
>> The options I have to implement the shopping cart:
>>
>> a)       Cookies -  satisfies 1 and 2, but assumes user doesn't turn
> off
>> cookies
>>
>> b)       HttpSession object - satisfies 1, but not 2
>>
>> c)       Database shopping cart object - satisfies 2, but not 1.
>>
>> I'd like to know,
>>
>> a)       am I basically correct with these assumptions.
>> b)       What would people recommend based on their experience.
>> c)   any struts open source project that might have this?
>>
>> Thanks very much,
>> Brian
>>
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to