This is a question for using Flash MX. I’m supposed to design an order form for a website, but not sure how to do it. I’ll describe what it needs to do.
It’s for a band’s website where they are selling CDs directly from them. They are using PayPal for people with credit cards, but if someone wants to send check or money orders I need to create a form that calculates totals, tax, whatnot and makes a receipt to print out. They are to physically send the check to the band. If the customer is buying less than 5 CDs then the price is 14.00 ea. If it’s 5 or more, then the price is 11.00 ea. And there is sales tax in CA. So, I need suggestions to scripting to create this. I’m really a novice at scripting and have created music players and that’s about it. So, I’m not good at creating scripts from scratch. Any help would be welcome! Thanks!
will it have to be dynamic, meaning will the number of different available cd’s change? can you use backend scripts? (php or other…)
do you have some experience using components? etc…
Thanks for responding. Backend scripts aren’t really an option because the server that the site is posted on has some trouble with php, at least. I have a little experience with components, such as the scrollbar, so I can kind of set that up. My idea was to have an input text field that would be where a person would set the quantity of the CDs, and then information fields where they would put their address, etc. And then do a submit button that would go to a frame where the total would be calculated. The total would add the sales tax, and shipping (which is variant also).
well, either you’ll need a LOT of code in your fla to account for every possible combination of number of cd’s/tax/shipping, or you’d retrieve the values on an “as needed” basis from a database depending on the user choices (he wants >10 cd’s ==select lower price// his zip code = CA == add that much tax//he wants ups same day shipping == add that much to toal etc etc…), almsot impossible to maintain, or update if prices/tax/shipping costs change…
It all depends on how scalable you want/need this to be…
Check this example layout:
http://www.amfphp.org/
(the “Pizza Service” thingy…)
Thanks again for the reply! Isn’t it possible to make it correspond to only two prices, since there are, and do an “if then” statement to calculate? And the tax is a set percentage. So, exactly what I need is code that will correspond to an input text box that will indicate quantity, another input box (possibly) that would indicate the state, and in the frame that would have the output, that dynamic text box would say $14 times anything <5 and $11 for anything >=5, and add the 7.25% if CA is the state. Shipping will be 4.50, so it would also have to add that. Or is this what makes it all very complicated?
No, if these are the only parameters, and they’ll never change, it’s ok, that’s not too hard. Have you tried yet, you seem to have the ideas on the setup already…?
I have tried, but like I said, I’m not all that savvy with scripting. I could probably figure out some kind of formula, but mostly I’m not sure how to post it after. I know I need to do the “set Variable” with the two prices, tax and shipping, but I’m not sure how to write a formula in actionscript so that it will post in the dynamic text box.