element at position 2 cannot be found
I have been beating my brains out trying to figure this out. If any of you have thoughts, I would love to hear them. I have a cflocation to redirect to PayPal as follows...
<cflocation url="https://www.paypal.com/cgi-bin/websrc?tax_cart=#WA_eCart_FormatNumber(WA_eCart_GetTax(whitcart), false, 2)#&no_note=0&no_shipping=1&return=http://xxxxxxxx.com/paypalsuccess.cfm&cmd=_cart&upload=1¤cy_code=USD&address_override=0&firstname=#IIf(isDefined('session.firstname'),'session.firstname',DE(''))#&lastname=#IIf(isDefined('session.lastname'),'session.lastname',DE(''))#&street1=#IIf(isDefined('session.street1'),'session.street1',DE(''))#&street2=#IIf(isDefined('session.street2'),'session.street2',DE(''))#&city=#IIf(isDefined('session.city'),'session.city',DE(''))#&state_province=#IIf(isDefined('session.state_province'),'session.state_province',DE(''))#&postcode=#IIf(isDefined('session.postcode'),'session.postcode',DE(''))#&country=#IIf(isDefined('session.country'),'session.country',DE(''))#&email=#IIf(isDefined('session.email'),'session.email',DE(''))#&phone=#IIf(isDefined('session.phone'),'session.phone',DE(''))#&ordernumber=#IIf(isDefined('session.ordernumber'),'session.ordernumber',DE(''))#&handling_cart=#WA_eCart_FormatNumber(WA_eCart_GetShipping(whitcart)+WA_eCart_GetCharges(whitcart), false, 2)#&
<cfoutput>
<CFLOOP FROM='1' TO='#ArrayLen(session.whitcart_items)#' INDEX='i'>
<CFLOOP COLLECTION='#session.whitcart_items#' ITEM='y'>
<CFIF StructKeyExists(session.whitcart_items, y)>
#y#=#session.whitcart_items
</CFIF>
</CFLOOP>
</CFLOOP>
</cfoutput>
business=xxxxxx@xxxxxxx.com" />
When I run this, it comes back with element at position 2 cannot be found. The probem is that my array only has one item in it. I dumped it to the screen and see this...
Price=0.01 TotalPrice=0.01 Name=The_Day_After_His_Birth.pdf Weight=0 Description=The Day After His Birth FullDetails=1 The_Day_After_His_Birth.pdf (2) ID=2 TotalWeight=0 Quantity=1
So I am struggling as to what is occurring.
Thoughts?
