Link to home
Start Free TrialLog in
Avatar of BBGC
BBGCFlag for United States of America

asked on

Math calculations in a table by row

Hello. I'm looking for advice to a project.  I am not too sure how to approach the project so here are the details. What I want to do is to create an online form of products that:
- is easy to maintain and update
- can perform basic math calculations
- can suggest complementary products to items that the user adds
- users can submit the form and send it to me
- eventually (2-3 years) have online ordering

I can create a database, using those handy wizards, in m$ access to do the calculations. But my experience with actual code writing is basic and i have no experience with online databases or any type of scripting language. Looking ahead I will probably hire someone for online ordering so there are no security issues but I would be maintaining it so I prefer to learn how to create it.  From my criteria I am assuming that I should do it in a database and I can add functions as I go...?

For now I am just looking for a basic online form that performs basic math. I am using Dreamweaver creating the website and there is a addon that allows for math calculations but it would put a heavy load on the user and is extremely hard to maintain. What I would like to do is to perform calculations based upon numbers/values in cells under specific columns instead of using hidden input values. Here is an example table:

<form name="Cold_Appetizers" name="Cold_Appetizers">
 <table>
  <tr>
   <th>Amount</th>
   <th>Item</th>
   <th>Price</th>
   <th>Minimum Servings</th>
   <th>Maximum Servings</th>
   <th>Total</th>
   <th>Minimum Serves</th>
   <th>Maximum Serves</th>
  </tr>

  <tr>
   <td>  <input type="text" name="amount1" id="amount1" />  </td>
   <td>  Cheese Tray  </td>
   <td>  10.00  </td>
   <td>  5  </td>
   <td>  15  </td>
   <td>  <input type="text" name="total1" id="total1" readonly="true" />  </td>
   <td>  <input type="text" name="min1" id="min1" readonly="true" />  </td>
   <td>  <input type="text" name="max1" id="max1" readonly="true" />  </td>
  </tr>

  <tr>
   <td>  <input type="text" name="amount2" id="amount2" />  </td>
   <td>  Fruit Tray  </td>
   <td>  15.00  </td>
   <td>  10  </td>
   <td>  20  </td>
   <td>  <input type="text" name="total2" id="total2" readonly="true" />  </td>
   <td>  <input type="text" name="min2" id="min2" readonly="true" />  </td>
   <td>  <input type="text" name="max2" id="max2" readonly="true" />  </td>
  </tr>

 </table>
 <table>
  <tr>
   <th>  Grand Total  </th>
   <th>  Approx. Minimum Servings  </th>
   <th>  Approx. Maximum Servings  </th>
  </tr>

  <tr>
   <td>  <input type="text" name="grand_total" id="grand_total" readonly="true" />
   <td>  <input type="text" name="avg_min_serves" id="avg_min_serves" readonly="true" />
   <td>  <input type="text" name="avg_max_serves" id="avg_max_serves" readonly="true" />
  </tr>
 </table>
</form>

There are 200+ items and I already have all the items and descriptions in various types of formats. I have it in an access database, xml,  and in tables. I just don't know where to begin. Please advise.


Thanks in advance.
Avatar of magglass1
magglass1

The best way to add up this information is taking it straight from the database.  If you have a list of the products the customer wants or in their shopping cart, select them from the database and sum their prices.  Also multiply each item price by the quantity.

Your question is slightly confusing, but if you're trying to start a website, I'd consider hiring someone to do the coding work for you since you're pretty much asking for an online order system.  What is the purpose of this project?
ASKER CERTIFIED SOLUTION
Avatar of amir22651
amir22651
Flag of Iran, Islamic Republic of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial