Thanks all for your input. I think I'm going to set a client var as soon as a 
cart is started and then a session var to flag whether a cart has been loaded 
from a previous session. That should prevent a db query for every page view and 
should also handle spiders that do not accept cookies.
Also thanks for tips on cleaning up orphaned carts!
Mischa.





> That's the way I do it. Instead of a separate temp table I just add a column
for a switch and if the shopper buys I set the switch to 1. I set up a
scheduled task to delete all the 0's that are over 2 months old, just to
keep the table cleaned out. I'm not worried about the cookie hijacking
because they aren't giving me any sensitive info. They're just storing
selections. If someone wants to hijack that, they must not have very much to
do.

Rick

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Mischa
Uppelschoten ext 10
Sent: Wednesday, August 30, 2006 10:05 AM
To: Web Site
Subject: re[6]: [ACFUG Discuss] saving shopping carts


Ok, makes sense. I guess the db is the only place the shopping cart is
stored? In other words, every change the user makes to the cart is applied
directly to the database?
Mischa.

> What I do is set a cookie using a unique id. I store the shopping cart
info
in a database along with the unique id. If the shopper leaves and returns, I
read the cookie and get the shopping cart info from the DB and let them pick
up where they left off. I also set the unique id as a SESSION VAR so I can
keep track of their shopping list while they are in SESSION, even if they
have cookies disabled.

Rick Lansford

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Mischa
Uppelschoten ext 10
Sent: Tuesday, August 29, 2006 9:19 PM
To: Web Site
Subject: re[4]: [ACFUG Discuss] saving shopping carts


Well, I'm open to suggestions. It's just that I want to please my customers
by offering them the shopping cart they had when they left the site. It
doesn't *have* to be stored in a database, but I thought db storage was the
best option for this type of data? Currently I instantiate the shopping cart
object in the user's session scope and the data is flushed to the db when
the session times out.
Mischa.


> Mischa,
I was talking this over with some friends.  Really, what is the need for the
database storage?  A few ideas were thrown around, but perhaps some
background on what you are really going to achieve would help.

Teddy


On 8/29/06, Mischa Uppelschoten ext 10 <[EMAIL PROTECTED]>
wrote:
Thanks Teddy!
>
Mischa,
Part 1:
You are trying to prevent the user's shopping cart from expiring by storing
it in the database and then retrieve it when they restart their session?
** Yes, that's exactly it.


Part 2:
OnSessionEnd takes the session scope as an argument.  Thus unless you pass a
scope into the application.cfc methds, you won't be able to manipulate them.
I have not tried this and I am not sure this is possible, but perhaps you
can test:

<cffunction name="onSessionEnd" returnType="void" output="false">
<cfargument name="sessionScope" type="struct" required="true">
<cfargument name="clientScope" type="struct" required="false">

<cfset client.foo = "bar">
</cffunction>


** I tried this and added the line for clientScope (I already had session
and application and those work fine). OnSessionEnd still fails silently when
setting or getting variables in clientScope.






Teddy


On 8/29/06, Mischa Uppelschoten ext 10 < [EMAIL PROTECTED]>
wrote:
I'm probably missing something. Here is my situation:
CFMX7. I'm using OnSessionEnd in Application.cfc to store a user's shopping
cart in a database. Works fine. Currently, after the session times out, only
the shopping cart page is able to instantiate a shopping cart in the user's
session scope and load the old cart. I would like to change this so that any
page has the ability to retrieve the shopping cart, but I'm struggeling with
performance considerations; I don't want to do a database lookup on every
page request. (I want every page to be able to retrieve a user's cart
because I built a shopping cart indicator which is displayed on every page).
I have noticed that you cannot set a client variable in the OnSessionEnd
event (the event fails silently after the client.myvar=  line if you do so),
this would have been perfect because a simple check for a client var and
then to a db lookup or not would have been easy. Obviously you cannot set a
cookie var either. Should I not worry about an additional db lookup for
every page request, or is there a better way to do this?
Many thanks!
Mischa.



-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?falogin.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------







--
<cf_payne />

Blog: http://cfpayne.wordpress.com/
Atlanta CFUG: http://www.acfug.org
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
------------------------------------------------------------- <



Mischa Uppelschoten
The Banker's Exchange, Inc.
2020 Hills Avenue NW
Atlanta, GA  30318

Phone:    (404) 605-0100 ext. 10
Fax:    (404) 355-7930
Web:    www.BankersX.com
Follow this link for Instant Web Chat:
http://www.bankersx.com/Contact/chat.cfm?Queue=MUPPELSCHOTEN



-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?falogin.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------







--
<cf_payne />

Blog: http://cfpayne.wordpress.com/
Atlanta CFUG: http://www.acfug.org
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
------------------------------------------------------------- <



Mischa Uppelschoten
The Banker's Exchange, Inc.
2020 Hills Avenue NW
Atlanta, GA  30318

Phone:    (404) 605-0100 ext. 10
Fax:    (404) 355-7930
Web:    www.BankersX.com
Follow this link for Instant Web Chat:
http://www.bankersx.com/Contact/chat.cfm?Queue=MUPPELSCHOTEN


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=gin.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------







-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------





<



Mischa Uppelschoten
The Banker's Exchange, Inc.
2020 Hills Avenue NW
Atlanta, GA  30318

Phone:    (404) 605-0100 ext. 10
Fax:    (404) 355-7930
Web:    www.BankersX.com
Follow this link for Instant Web Chat:
http://www.bankersx.com/Contact/chat.cfm?Queue=MUPPELSCHOTEN



-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=gin.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------







-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------





<



Mischa Uppelschoten
The Banker's Exchange, Inc.
2020 Hills Avenue NW
Atlanta, GA  30318

Phone:    (404) 605-0100 ext. 10
Fax:    (404) 355-7930
Web:    www.BankersX.com
Follow this link for Instant Web Chat:
http://www.bankersx.com/Contact/chat.cfm?Queue=MUPPELSCHOTEN



-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------



Reply via email to