listtoarray -adding values with commas throws an error?

2009-05-29 Thread Jeff F
I've got a simple shopping cart that stores into in an array. If the product name has commas, and it attempted to be added to the cart, it throws an error: The value cannot be converted to a number. Error message is telling me this is the problem line: cfset subtotal = subtotal +

Re: listtoarray -adding values with commas throws an error?

2009-05-29 Thread Charlie Griefer
On Fri, May 29, 2009 at 6:55 AM, Jeff F cftalk_l...@fongemie.com wrote: I've got a simple shopping cart that stores into in an array. If the product name has commas, and it attempted to be added to the cart, it throws an error: The value cannot be converted to a number. Error message is

Re: listtoarray -adding values with commas throws an error?

2009-05-29 Thread Ian Skinner
As I said on the Adobe forums, do not use commas as your list delimiters. |tempvalue = listtoarray('#attributes.id#|#attributes.name#|#attributes.price#|#attributes.q uantity#|#attributes.category#','|');| Or otherwise be more explicit about your array creation. Or you could try implicit

Re: listtoarray -adding values with commas throws an error?

2009-05-29 Thread Peter Boughton
You don't need # outside of a string. This works fine: tempvalue = [ attributes.id , attributes.name , attributes.price , attributes.quantity , attributes.category ] ~| Want to reach the ColdFusion community with something