|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Why did this suddenly break>
Author: Mark Leder
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32958#165361
Hi all,
Using MX6.1 Win 2003 server, J2EEsessionvars enabled.
I have a shopping cart, when someone initially goes to the checkout page (to
enter first name, last name, etc), a session.ecom structure is created
containing empty strings. However, the past few days, the cart acts like it
can't find the session.ecom structure, thus throwing errors (can't find the
structure) (and I haven't changed any code). I've tried restarting CF at the
server. I've used this code for some time without problem until now.
When I remove the IsDefined statement, and rerun the checkout page, the cart
works normally.
What am I doing wrong?
==========================
<cflock name="#REQUEST.prefix##SESSION.SessionID#" timeout="10"
type="exclusive">
<cfif NOT IsDefined("SESSION.ecom")>
<cfscript>
SESSION.ecom = StructNew();
// We will collect these from user; start blank
// Personal Information
SESSION.ecom.IPAddressNo = "#CGI.REMOTE_ADDR#";
SESSION.ecom.UserAgent = "#CGI.HTTP_USER_AGENT#";
SESSION.ecom.FirstName = "";
SESSION.ecom.MiddleName = "";
SESSION.ecom.LastName = "";
SESSION.ecom.surName = "";
</cfscript>
</cfif>
</cflock>
Thanks, Mark
|
May 24, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||