Jump to content

Recommended Posts

I am setting up a order form on my website http://www.acehireltd.co.uk/orderform/ , I have been able to pretty much set everything up including auto complete and adding space for another product when you check a box etc. However there is one last thing I need to do which I just cant work out.

Each product has a price that gets auto filled from a mysql datebase when the user enters the products name or code, the user must the enter a  quantity of how many of that product they want. I need the price and quantity field to be multiplied together an the result of this displayed in another field on the form (e.g called total product price).

I also then at the bottom of the form need a complete total price to be worked out by adding all the total product prices as well as the delivery cost field.

I hope someone can help.

Thanks you.

Some code might help. What have you actually tried so far?

 

I had yet to find anything suitable but after more research I think it will have to java script, if i found some and tried with this could i still post it here and would you beable to help fix anything if needed?

Yes you'll need to use JavaScript to dynamically update the totals without reloading the page. I would only use it to display a total though, not actually post it to the handling PHP code. Otherwise users you could just inject or change the input to whatever they want. If you run into problems by all means post it here, but include the erroneous code and explain the problem.

 

By the way I had a quick look at your order form, and adding products to it confused the hell out of me. I got a code ("HE0510") and entered it into the text box, a loading graphic was displayed but nothing happened? Am I supposed to enter the details in myself?

Yes you'll need to use JavaScript to dynamically update the totals without reloading the page. I would only use it to display a total though, not actually post it to the handling PHP code. Otherwise users you could just inject or change the input to whatever they want. If you run into problems by all means post it here, but include the erroneous code and explain the problem.

 

By the way I had a quick look at your order form, and adding products to it confused the hell out of me. I got a code ("HE0510") and entered it into the text box, a loading graphic was displayed but nothing happened? Am I supposed to enter the details in myself?

 

OK i have opened a topic on the javascript part of the forum if you look there it will have to code and whats happening now.

http://www.phpfreaks.com/forums/index.php?topic=341541.0

 

when your type in a code it should then bring up a drop down list of all the codes that include what you have enter, you then click that and it should the auto fill the code, description and price field.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.