Couple of suggestions:
1) Are you using a client-side image map to submit the form? If so I'd recommend
against that -- imho it's liable to cause problems... if not, I"d recommend against
using "update.x" or in general using the dot in the name of a form field... that's
also liable to cause problems...
2) I'd recommend checking to see if the form was submitted by using
structkeyexists(form,"update") instead of isdefined("form.update").
4) I'd definitely get comfortable with structures -- While you may already have a
system here that works using multi-dimensional arrays, #session.cart[i].itemname#
#session.cart[i].itemprice# is a lot easier to read than #session.cart[i][0]#
#session.cart[i][1]# ... given the code below I can't even tell if itemname and
itemprice are included in those arrays -- and I probably misguessed come to think of
it, the 2nd item is probably quantity. Hence my recommendation of structures.
5) ... Is that really correct? session.cart[i][0]? ... CF counts arrays starting with
1 rather than 0 so... using 0 as an array index _should_ produce an error.
6) I'm not quite sure what you mean by: "However, the update page does not display the
table with the revised qty, etc." The code you provided doesn't show an html table, so
there's not much I can suggest that I think would actually help for this issue.
I hope the rest of my suggestions are helpful tho...
> I am currently working on a simple shopping cart for our
> book orders. I have update fields for each book for any
> changes to quantity a customer may want to make. Clicking
> Update takes them to the update.cfm page which displays
> the new qty and price (using sessions). However, the
> update page does not display the table with the revised
> qty, etc. Any ideas please?
> Here is the page which should display the ordered books::
> <CFParam name="product" default="0">
> <CFIF isDefined('form.update.x')>
> <CFLOOP index="i" from="1" to="3">
> #session.cart[i][0]#
> #session.cart[i][1]#
> </CFLOOP>
> </CFIF>
> Robert Orlini
> HW Wilson
> 718-588-8400 x2656
> ���
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~|
> Archives:
> http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
> Subscription: http://www.houseoffusion.com/cf_lists/index.
> cfm?method=subscribe&forumid=4
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Signup for the Fusion Authority news alert and keep up
> with the latest news in ColdFusion and related topics.
> http://www.fusionauthority.com/signup.cfm
> Unsubscribe: http://www.houseoffusion.com/cf_lists/uns
> ubscribe.cfm?user=633.558.4
s. isaac dealey 972-490-6624
new epoch http://www.turnkey.to
lead architect, tapestry cms http://products.turnkey.to
tapestry api is opensource http://www.turnkey.to/tapi
certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
http://www.cfhosting.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4