In case the session scope isn't available you have a number of options. One would be to convert the cart object to a wddx packet or xml data and store it in a hidden field. If you don't want it readable you could also encrypt it. Create a function for converting the cart to a string and one for parsing it and just call it on each page and do whatever manipulation you need to do. Something like this.
<cffunction name="setFormWDDX" output="No"> <cfargument name="structIN" type="struct" required="Yes"> <cfwddx action="CFML2WDDX" input="#structIN#" output="myCart"> <cfset myCart = URLEncodedFormat(Encrypt(myCart,"yourCryptKey"))> <cfreturn myCart> </cffunction> <cffunction name="getFormWDDX"> <cfargument name="wddxIN" type="string" required="Yes"> <cfset myCart = Decrypt(URLDecode(wddxIN),"yourCryptKey")> <cfwddx action="WDDX2CFML" input="#myCart#" output="myCart"> <cfreturn myCart> </cffunction> // store cart like this <input type="Hidden" name="myCart" value="#setFormWDDX(cartStruct)#"> // parse cart like this on each subsequent page <cfset cartStruct = getFormWDDX(form.myCart)> If you can do it in the session then certainly disregard this and use it. On Mon, Jul 13, 2009 at 4:02 PM, Dr. Who <[email protected]> wrote: > > ok.. i am being asked to create a form (shopping cart?? wtf) that will > be a list of parts that some one would email some one else. > but they dint have a starting point or an defined flow to the form > > i am just starting to think about this and would appreciate some advice. > http://63.144.103.199/products/index.cfm?n1ID=11&n2ID=81&n3ID=295 > > the scope of this is defiantly going to change by mid mornning.. > > i have worked on a series of forms that work great over the last 2 months. > but now they want a shopping cart type thing, and i have no idea where to > begin > > i have never done a cart. > and dont really understand storing temp data et.. > > thanks guys. > i appreciate any pointers or what ever.. > -paul > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:300042 Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5
