October 8th, 2003, 09:07 AM
I am desperarte....
thought i was on the right track but...since you see me posting here assume I was way off track.
Each item on the menu has the some additional items associated with it.
ex. "name0" "quantity0" "beans0" "meat0" "extraMeat0"
Since my menu has over 100 products in it you can see why I do not want to send the generated results to the Resturant without looping over it to see if the Quantity is GT < 0. And removing that from the order that is generated.
I was trying to get the quanity and If the quanity is < 0 i wanted to display it in the email along with the items that also end in "0" (meat0, beans0. extraMeat0, name0).
Please advise on your feedback and ideas. TY in advance
I would appreciate any help you offer me.
If you have a better solution I am all ears.
October 8th, 2003, 11:42 AM
I might have missed another post somewhere, but I don't really understand your post. What is the system you're trying to write and what is the problem?
And for reference '>' is the "Greater Than" and '<' is "Less Than."
October 8th, 2003, 11:51 AM
Re: I am desperarte....
I have an order form www.moesmaitland/order/order.asp
the form action is written in coldFusion.
I only want to pass the Item and the associated properties to an email if the Items have a quanity of 1 or greater.
That way the resturant does not get a huge print out of their menu each order and have to find the ITEMS that were ordered. It will be real simple.
I sorta have something working now if you go to the URL above. but its so GHETTO.
Thanks for looking at this for me.
October 8th, 2003, 12:15 PM
When the user clicks submit it look like it takes them to mailform.cfm, which I can't see, but assume cycles through the products and checks if they are 0 or not.
First, I would add default='0' to all the "Product" inputs. Without defaults they will be null and that could mess things up when comparing them to zero.
Then, in the mailform.cfm I would use something like:
<cfmail from="theirEmail" to="yourEmail" subject="ORDER">
<cfloop from='1' to='Number of Product' index='i'>
<cfset tmp = "Form.Product" & i>
<cfif #tmp# gt 0>PRINT OUT INFO FROM POSITION i</cfif>
Not sure if this is what you are looking for, but let me know if you need more info, or something along different lines.
October 8th, 2003, 12:18 PM
Yes that is basically what I have now.
I guess that seems to be the best situation