Sorry - I don't think I sent enough information with my first posting. The
problem I am having is I am trying to modify the code a developer produced
years ago. He cannot be reached. The client wanted the pages of their site to
be rearranged slightly, and now I am getting an error message generated when
transitioning from the first to the second page of the site. Any help would be
greatly appreciated. Below I have the important code from the first and second
pages as well as the error message generated.
This is the first page.
<CFOUTPUT>
<CFIF ISDEFINED("COOKIE.ShoppingCart_Cookie") IS TRUE>
<CFQUERY DATASOURCE="LIGHT">
DELETE *
FROM TEMP_SHOPPING_CART
WHERE CUSTOMERID LIKE '#COOKIE.ShoppingCart_COOKIE#'
</CFQUERY>
<CFCOOKIE NAME="ShoppingCart_COOKIE" VALUE="" expires="now">
</cfif>
</cfoutput>
<CFQUERY DATASOURCE="LIGHT" NAME="SELECT_DATE">
SELECT *
FROM TEMP_SHOPPING_CART
</cfquery>
<CFOUTPUT>
<CFQUERY DATASOURCE="LIGHT" NAME="qPULL">
SELECT MAX(ORDER_NUMBER) As MaxNumber
FROM Order_ID
</cfquery>
<CFSET ORDERID = (#qPULL.MAXNUMBER#)>
<CFSET RANDOM_CHOICE = #RandRange(1, ORDERID)#>
<CFQUERY DATASOURCE="LIGHT" NAME="GRAB_ORDERTYPE">
SELECT *
FROM ORDER_ID
WHERE ORDER_NUMBER = #RANDOM_CHOICE#;
</cfquery>
<CFSET TYPE = GRAB_ORDERTYPE.ORDER_PREID>
<CFSET COMPLETE_ORDER_GENERATOR = #RandRange(100, 100000)#>
<CFSET ORDER_NUMBER = TYPE & COMPLETE_ORDER_GENERATOR>
<CFSET CustomerID = #ORDER_NUMBER#>
</CFOUTPUT>
------------------------------------------------------------------
This is the second
<CFIF #PAGE_ID# IS "UPDATING">
<CFOUTPUT>
<CFQUERY DATASOURCE="LIGHT">
UPDATE TEMP_SHOPPING_CART
SET TICKET_NUMBER='#FORM.TICKET_NUMBER#'
WHERE CUSTOMERID = '#Cookie.ShoppingCart_Cookie#'
</CFQUERY>
<CFSET PAGE_ID = "RETURNING">
</CFOUTPUT>
<CFELSE>
<CFSET PAGE_ID = "RETURNING">
</CFIF>
-------------------------------------------------------------
below is the error message
Error Diagnostic Information
An error occurred while evaluating the expression:
#Cookie.ShoppingCart_Cookie#
Error near line 11, column 25.
--------------------------------------------------------------------------------
Error resolving parameter COOKIE.SHOPPINGCART_COOKIE
The cookie value SHOPPINGCART_COOKIE was not found in the current template
file. The cause of this error is very likely one of the following things:
The name of the cookie variable has been misspelled.
The cookie variable has not yet been created or has timed out.
To set default values for cookie variables you should use the CFPARAM tag (e.g.
<CFPARAM NAME="Cookie.Color" DEFAULT="Red">)
The error occurred while processing an element with a general identifier of
(#Cookie.ShoppingCart_Cookie#), occupying document position (11:24) to (11:51)
in the template file D:\HTTP\pininet\clients\lightTest2005old\step3.cfm.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Now there’s a better way to fax. eFax makes it possible to use your existing
email account to send and receive faxes. Try eFax free.
http://www.houseoffusion.com/banners/view.cfm?bannerid=63
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:847
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54