Forum Moderators: coopster

Message Too Old, No Replies

confirmation page

         

stehl

7:03 pm on Oct 23, 2009 (gmt 0)

10+ Year Member



Hi,
This is gonna be a long post. And I appreciate your time in reading it and hope you can help me.

I have used tectite formail processor(google it) to set up a multi-page form that can do everything I need, including send an e-mail to the user as a receipt of order , and write the data securely to a .xls file so the company can process it manually. it does everything except one thing, calculate the total of the order. tectite offers a computation module to do calculations from the forms , but they want 300.00 for it and the company does not want to spend that.

What I need it to be able to do is to show a total derived from inputs from the previous forms. The product is a set price, and the only thing that will change the quantity and rush delivery.

I can pass hidden fields from the previous forms to the final confirmation page and was thinking of using them as CONSTANTS since there is no variables in the product price. Can some one help me come up with the coding to display the total based on user selection:

Here is the site: It does not display right in Ie yet, but I am fixing it so take a look in firefox.(stupid ie hax) Also you can just click thru, The site goes no where and i have no required fields or a confirmation page. YET

<snip>

I have a basic idea of how i could make it work but not sure if it will. Im not sure if php can get the value for the hidden fields? or if the value from the feilds can be calculated? Clarification?

Example:
On the main forms, have the hidden feilds with there value set to the prices. Transfer them through all the form pages and on the confirmation page use an if / else statement to display it.
Also the inputs are check marks on the forms.
(no I cant code so this is just a free flow idea.)


these would be constants
SHIPPING 6.95
RUSH_DELIVERY 7.95
HEALTHY_START 89.95
EXTRA_BOTTLE 39.95

this would be variable
total 0

if RUSH_DELIVERY = checked {
total = SHIPPING + RUSH_DELIVERY }

else {
total =SHIPPING
}

if HEALTHY_START = checked {
total = SHIPPING + HEALTHY_START }

else {
total=SHIPPING
}

if RUSH_DELIVERY & HEALTHY_START = checked {
total=SHIPPING + RUSH_DELIVERY+HEALTHY_START }

else {
total=SHIPPING
}

if EXTRA_BOTTLE = checked {
total=SHIPPING + EXTRA_BOTTLE }

else {
SHIPPING = 6.95
}

and so on down the list to use all possible combinations

In Short, Shipping is alway included and if the customer chooses, rush deliver , extra bottle , or healthy start(3 bottles) it adds up the total respectively and displays it?

the confirmation page can be a .php page, so this script could be placed in the page or included.

and the output would be an page with a table with shipping cost
what they selected
and the total.

If you can assist me , I would greatly appreciate it.
Once again sorry for the long post. I need to get this figured out soon, the client is waiting.

[edited by: dreamcatcher at 7:27 pm (utc) on Oct. 23, 2009]
[edit reason] No Urls Please. See TOS. [/edit]

stehl

7:27 pm on Oct 23, 2009 (gmt 0)

10+ Year Member



sorry about the url.

stehl

9:06 pm on Oct 23, 2009 (gmt 0)

10+ Year Member



anybody?

stehl

8:41 pm on Oct 26, 2009 (gmt 0)

10+ Year Member



nevermind. I found out its not very secure to try and do it my way. But I do need help finding a way to access the post data on the c0nfirmation page with rawaccess() or something I heard. No idea?

rocknbil

9:48 pm on Oct 26, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard stehl, I imagine this gets no replies because no one uses tectite (neither have I).

I doubt' you'd need to define these as constants. Ordinary scalar variables should be fine. The "standard" way (which is one of many ways) is to

- on "cart" entry set a cookie with a unique ID. Put this same unique ID in a database, it is the "handle" by which you keep track of this customer.

- On submit of any pages, read the input data, update the database fields (subtotal, shipping, total, etc.) with the user selections.

- on final checkout, get the data associated with this unique ID from the database, output the entire order details to the page.

You could use anything to carry the data through - session variables, cookies, whatever, the only thing "insecure" might be passing along hidden fields, but unless it's sensitive data - which I see none, to this point - security of the data is not a high priority.

stehl

6:58 pm on Oct 27, 2009 (gmt 0)

10+ Year Member



I appreciate the reply. I actual got my client to order the computation module from the tectite company and awaiting its download link via email. I am going to set that up to do the task at hand. If you haven't looked into tectite, i would recommend it. Its a formail processor that can do multi-page forms, Advanced Error handling, Write to database, required fields...the list goes on.

And by the way security is a major issue because the site collects credit card numbers for the order and writes to a excel file for manual import into there database.

Cheers.. !

stehl

7:00 pm on Oct 27, 2009 (gmt 0)

10+ Year Member



For the future , could you outline the idea you mentioned above a little better. Im a complete programming noob. I am good at design and css and xhtml but functionality gets me.

rocknbil

9:13 pm on Oct 27, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



And by the way security is a major issue because the site collects credit card numbers for the order and writes to a excel file for manual import into there database.

By your first post, this was not evident, you just had basic total calculations. This changes things on levels I don't know that you fully understand.

I don't know the full details of this environment, but by what's been posted so far, you are sailing into troubled waters with this project. Unless your client is on a PCI compliant server, storing credit card info in any form is a very bad idea. They may not even be aware that this introduces a liability that is off the hook. Not only can they be sued in the event of a breach, the credit card companies can impose fines up to 30K USD. Introduce them to PCI Compliance [pcicomplianceguide.org].

could you outline the idea you mentioned above a little better.

Your outline was for general logic, reply was in general logic. Programming for a secure environment, especially in the area of handling credit card information, is no place to break into programming.

A small word of advice - don't take the issue of storing credit card info lightly, know what you're getting into. If they get sued or fined, who are they going to come after? You.